Loading dl-debug.c in gdb / Ubuntu 14.04.4 LTS
转自: https://stackoverflow.com/questions/36025694/loading-dl-debug-c-in-gdb-ubuntu-14-04-4-lts
==============================Question=============================
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?
==============================Answer=============================
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.