简体   繁体   中英

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 /usr | grep dl-debug.c , but, this file is not on my Linux.

Any help?

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 ua lot.

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM