This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/14870] Missing source information for binaries compiled with clang on Linux and OS X


https://sourceware.org/bugzilla/show_bug.cgi?id=14870

David Albert <davidbalbert at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from David Albert <davidbalbert at gmail dot com> ---
I believe this bug is now fixed. I just tested this on OS X 10.10.3 with Apple
Clang 6.1.0 (based on LLVM 3.6.0) and GDB 7.9.1 as well as an Ubuntu 15.04 VM
with Clang 3.6.0 and GDB 7.9 and was unable to reproduce in either instance.
I'm going to close this ticket. I've included my shell sessions below for
reference.


# OS X 10.10.3

$ clang --version
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix

$ gdb --version
GNU gdb (GDB) 7.9.1
[snip]

$ cat hello.c 
#include <stdio.h>

int main(int argc, const char *argv[])
{
        printf("Hello, world\n");
        return 0;
}

$ clang -g -O0 hello.c -o hello

$ gdb -q hello
Reading symbols from hello...Reading symbols from
/private/tmp/hello/hello.dSYM/Contents/Resources/DWARF/hello...done.
done.
(gdb) break main
Breakpoint 1 at 0x100000f4d: file hello.c, line 5.
(gdb) run
Starting program: /private/tmp/hello/hello 

[snip some unrelated warnings]

Breakpoint 1, main (argc=1, argv=0x7fff5fbff368) at hello.c:5
5               printf("Hello, world\n");
(gdb) next
Hello, world
6               return 0;
(gdb) next
0x00007fff8f5b45c9 in start () from /usr/lib/system/libdyld.dylib
(gdb) next
Single stepping until exit from function start,
which has no line number information.
[Inferior 1 (process 68284) exited normally]
(gdb) 




# Ubuntu 15.04

$ clang --version
Ubuntu clang version 3.6.0-2ubuntu1 (tags/RELEASE_360/final) (based on LLVM
3.6.0)
Target: x86_64-pc-linux-gnu
Thread model: posix

$ gdb --version
GNU gdb (Ubuntu 7.9-1ubuntu1) 7.9
[snip]

$ cat hello.c
#include <stdio.h>

int main(int argc, const char *argv[])
{
        printf("Hello, world\n");
        return 0;
}

$ clang -g -O0 hello.c -o hello

$ gdb -q hello
Reading symbols from hello...done.
(gdb) break main
Breakpoint 1 at 0x400510: file hello.c, line 5.
(gdb) run
Starting program: /home/vagrant/hello 

Breakpoint 1, main (argc=1, argv=0x7fffffffe618) at hello.c:5
5               printf("Hello, world\n");
(gdb) next
Hello, world
6               return 0;
(gdb) next
__libc_start_main (main=0x4004f0 <main>, argc=1, argv=0x7fffffffe618,
init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, 
    stack_end=0x7fffffffe608) at libc-start.c:323
323     libc-start.c: No such file or directory.
(gdb) next
[Inferior 1 (process 5001) exited normally]
(gdb)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]