Bug#676144: clang: compiling with -g flag doesn't introduce line number information recognizable by gdb
Jason White
jason at jasonjgw.net
Tue Jun 5 10:49:35 UTC 2012
Sylvestre Ledru <sylvestre at debian.org> wrote:
> Anything special about your system / install I should know ?
Nothing that comes to mind, but see discussion below.
>
> with amd64:
> $ clang -O3 -g -o test plop.c
> $ gdb test
> GNU gdb (GDB) 7.4.1-debian
> [...]
> Reading symbols from /tmp/test...done.
> (gdb) b main
> Breakpoint 1 at 0x400524: file plop.c, line 5.
> (gdb) run
> Starting program: /tmp/test
>
> Breakpoint 1, main () at plop.c:5
> 5 printf("%-6d%-6d\n", i, i*i);
> (gdb) bt
> #0 main () at plop.c:5
> (gdb)
I get identical results to yours if I include the -O3 flag, as above, but if I
omit the optimization flag I get the behaviour shown in the bug report.
Gdb also reports the absence of line number information if I specify -O0
explicitly.
Can you reproduce?
Regards,
Jason.
More information about the Pkg-llvm-team
mailing list