Ted
Ted

Reputation: 111

Loading dl-debug.c in gdb / Ubuntu 14.04.4 LTS

When I use gdb xxx, while loading, this is the result:

dl-debug.c:74: No such file or directory. 
dl-debug.c:74: No such file or directory. 
dl-debug.c:74: No such file or directory. 
dl-debug.c:74: No such file or directory. 
dl-debug.c:74: No such file or directory. 

lots of it, how can I solve it?

I've searched this in the internet, but all the answers are not the resolution. Some might recommended that apt-get source glibc or apt-get install libc-source, but NO HELP.

I've tried to find /usr | grep dl-debug.c, but, this file is not on my Linux.

Any help?

Upvotes: 4

Views: 2543

Answers (2)

musbach
musbach

Reputation: 638

It worked great! The file ~/.gdbinit didn't exist in my case. I create it with:

echo "directory /usr/src/glibc/eglibc-2.11.1/elf" >> ~/.gdbinit

Having done this I didn't had to type it in anymore. I tested it with gdb and gdb -tui.

Maybe this helps also for this bug:https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/571356 I am running on Ubuntu 3.13.0-66 with gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04)

Upvotes: 0

Ted
Ted

Reputation: 111

I've solved this problem.

Firstly, use "apt-get install eglibc-source" to get the source file, while "glibc-source" is not a valid package. Secondly, locate your source file .tar.xz (mine is in /usr/src), uncompressed it. Finally, run gdb, and type "directory /usr/src/glibc-xxx(your location)/elf", and "dl-debug.c" is in this directory.

Also, adding "directory /usr/src/glibc-xxx(your location)/elf" in ~/.gdbinit might help u a lot.

Upvotes: 6

Related Questions