Can't debug shared library with gdb

Viewed 792

When I attach to process with GDB I saw that warning:

Reading symbols from /CloneFileSystem/lib/ld-uClibc.so.0...
(No debugging symbols found in /CloneFileSystem/lib/ld-uClibc.so.0)
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.

Even I use set sysroot /CloneFileSystem with all the libraries there, that not help.

My process call to function in shared library and that function call to another function in another shared library.

For example ProcessFunc-> Lib1Func -> Lib2Func

I want to debug Lib2Func but when I run command b Lib2Func gdb can't set a breakpoint there event that library is already loaded

file myexe -> interpreter /lib/ld-uClibc.so.0

When I use info sharedlibrary in GDB I can't the value in From and To (address of loaded are empty)

1 Answers

You might want to try recompiling the library with a -g option. It's saying it can't find the debug info. -g provides for debugging info if you are using gcc. This is the first thing i'd check. If the library is big this may take awhile.

Related