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 01:24:16 UTC 2012
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;
}
After compiling with clang -g -o test test.c
(gdb) start
Temporary breakpoint 1 at 0x4005b4
Starting program: /tmp/test
Temporary breakpoint 1, 0x00000000004005b4 in main ()
(gdb) n
Single stepping until exit from function main,
which has no line number information.
If I compile with gcc 4.7.0-11 and run gdb I get line number information as
usual.
The version of gdb installed is 7.4.1-1.1, AMD64 architecture.
This appears to have been introduced as of Clang 3.1.
Apologies in advance if this turns out to be due to an error/oversight on my
part. Thanks to all involved for bringing Clang to Debian - I'm finding it
useful and the excellent error messages are very helpful as I'm trying to improve
my programming skills at the moment.
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages clang depends on:
ii libc6 2.13-33
ii libclang-common-dev 3.1-4
ii libffi5 3.0.10-3
ii libgcc1 1:4.7.0-11
ii libllvm3.1 3.1-1
ii libstdc++6 4.7.0-11
ii libstdc++6-4.6-dev 4.6.3-7
Versions of packages clang recommends:
ii llvm-3.1-dev 3.1-1
ii python 2.7.2-10
clang suggests no packages.
-- no debconf information
More information about the Pkg-llvm-team
mailing list