Displaying 3 results from an estimated 3 matches for "tp23033690p23049871".
2009 Apr 14
0
[LLVMdev] problems with dwarf/gdb
Hi Ken,
Ken McMillan wrote:
> I'm having trouble debugging x86 code generated by LLVM.
> GDB does work with the code, but not correctly, for example,
> the "next" command does not skip over a function call.
>
> Here's an example.
>
> Source program gdb1.c:
>
> int x;
>
> void foo(){
> x++;
> }
>
> void bar(){
> x--;
> }
>
2009 Apr 14
2
[LLVMdev] problems with dwarf/gdb
......
>
> 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?
Thanks -- Ken
--
View this message in context: http://www.nabble.com/problems-with-dwarf-gdb-tp23033690p23049871.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.
2009 Apr 14
3
[LLVMdev] problems with dwarf/gdb
I'm having trouble debugging x86 code generated by LLVM.
GDB does work with the code, but not correctly, for example,
the "next" command does not skip over a function call.
Here's an example.
Source program gdb1.c:
int x;
void foo(){
x++;
}
void bar(){
x--;
}
int main(){
foo();
bar();
return 0;
}
commands:
$ llvm-gcc -g -emit-llvm -c gdb1.c -o gdb1.bc
$ llc