How to resolve the shared library of a function in core file, using GDB - when no symbols are loaded?

48 Views Asked by At

I have a core file in which not all shared library symbols are available, the backtrace looks like this:

Thread 1 (Thread 0x7f63f0cfe700 (LWP 16501)):
#0  0x00007f63f04b19de in ?? ()
#1  0x00007f63f0cf4700 in ?? ()
#2  0x00007f63f7a216ea in start_thread () from /lib64/libpthread.so.0
#3  0x00007f63f512250f in clone () from /lib64/libc.so.6

I want to detect in which shared library the function of frame #1 (address 0x00007f63f0cf4700) is located.

info symbol does not resolve it, since the symbols aren't available.

I can do it manually - run info sharedlibrary and calculate to which shared-library range this function belongs, but this solution is quite cumbersome.

Is there an easier way to achieve that?

1

There are 1 best solutions below

2
Employed Russian On

I want to detect in which shared library the function of frame #1 (address 0x00007f63f0cf4700) is located.

Besides the solution offered by ssbssa, you could also use readelf -Wn core and look for the NT_FILE note.