I see. Here's another interesting issue: (gdb) b gdb1.c:4 No line 4 in file "gdb1.c". (gdb) step foo () at /home/mcmillan/projects/impact2/test//gdb1.c:4 4 x++; (gdb) You can see that I can step to line 4, but I can't set a breakpoint there. (I used -disable-fp-elim in the compilation). Have you seen this before? Thanks -- Ken Dale Johannesen wrote:> > > On Apr 14, 2009, at 4:19 PMPDT, Ken McMillan wrote: > >> >> >> >> Argiris Kirtzidis wrote: >>> >>> ... >>> >>> Try >>> llc -disable-fp-elim gdb1.bc >>> >>> >> >> Thanks, I would never have guessed that :-). >> >> Are there any other optimizations that are harmful to >> debug info that I should know about? > > Lots of them. Partly this is because the job of most optimizations is > to change the code from something that corresponds fairly closely to > the source, to something that doesn't; good, or even usable, debug > info with optimization is an active research area. And partly it's > because we haven't done a lot of work on it yet in llvm. > > But I don't think anything else run by default makes life as difficult > as fp elimination. > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-- View this message in context: http://www.nabble.com/problems-with-dwarf-gdb-tp23033690p23051062.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
Ken McMillan wrote:> I see. Here's another interesting issue: > > (gdb) b gdb1.c:4 > No line 4 in file "gdb1.c". > (gdb) step > foo () at /home/mcmillan/projects/impact2/test//gdb1.c:4 > 4 x++; > (gdb) > > You can see that I can step to line 4, but I can't set a breakpoint there. >Works fine here (llvm 2.5, 32 bit, gdb 6.8) Try llc -disable-fp-elim -fast gdb1.bc If you do llvm-gcc -g gdb1.c -o gdb1 does it have the same issue ? -Argiris
Well... $ ~/software/llvm-gcc4.2-2.5-x86-linux-RHEL4/bin/llvm-gcc -g gdb1.c -o gdb1 /tmp/ccbAj8x9.s: Assembler messages: /tmp/ccbAj8x9.s:35: Error: suffix or operands invalid for `push' /tmp/ccbAj8x9.s:44: Error: suffix or operands invalid for `pop' /tmp/ccbAj8x9.s:56: Error: suffix or operands invalid for `push' /tmp/ccbAj8x9.s:65: Error: suffix or operands invalid for `pop' /tmp/ccbAj8x9.s:77: Error: suffix or operands invalid for `push' /tmp/ccbAj8x9.s:94: Error: suffix or operands invalid for `pop' Don't know what that's about. If I use the -S option and then compile the .s file with gcc, it works fine (but again, can't set breakpoints in gdb). I am currently using gdb 6.6. Will try 6.8... Thanks -- Ken Argiris Kirtzidis wrote:> > Ken McMillan wrote: >> I see. Here's another interesting issue: >> >> (gdb) b gdb1.c:4 >> No line 4 in file "gdb1.c". >> (gdb) step >> foo () at /home/mcmillan/projects/impact2/test//gdb1.c:4 >> 4 x++; >> (gdb) >> >> You can see that I can step to line 4, but I can't set a breakpoint >> there. >> > > Works fine here (llvm 2.5, 32 bit, gdb 6.8) > > Try > > llc -disable-fp-elim -fast gdb1.bc > > If you do > llvm-gcc -g gdb1.c -o gdb1 > > does it have the same issue ? > > > -Argiris > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-- View this message in context: http://www.nabble.com/problems-with-dwarf-gdb-tp23033690p23147192.html Sent from the LLVM - Dev mailing list archive at Nabble.com.