Bug#676144: clang: compiling with -g flag doesn't introduce line number information recognizable by gdb

Sylvestre Ledru sylvestre at debian.org
Tue Jun 5 10:18:31 UTC 2012


On 05/06/2012 03:24, Jason White wrote:
> Package: clang
> Version: 3.1-4
> Severity: normal
>
> To reproduce this, suppose we have a simple test program such as:
>
> #include<stdio.h>
> int main() {
>    int i;
>    for (i = 1; i<= 10; i++)
>      printf("%-6d%-6d\n", i, i*i);
>    return 0;
> }
>
>
Anything special about your system / install I should know ?

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)

Sylvestre





More information about the Pkg-llvm-team mailing list