This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Issue : external symbols aren't loaded automatically with shared objects


Hi,

Hope this is the good place to post my issue.

My host is a x86-64 linux computer with gdb 7.8.2
My target is a mips with gdbserver 7.8.2.

All my binaries and shared object are stripped and debug symbols are
located in a different directory.

release_dir/rootfs/usr/bin/process wich is the process i'm running on the target
release_dir/debug_symbols/process.debug the symbol file of the process

same for the shared objects
release_dir/rootfs/usr/lib/mylib.so
release_dir/debug_symbols/mylib.so.debug

After connecting gdb to the target,
i set the sysroot to release_dir/rootfs and the debug-file-directory
to release_dir/debug_symbols.

Problem gdb says that the symbols are missing :
>From        To          Syms Read   Shared Object Library
0x77fdee70  0x77fe5240  Yes (*)     release_dir/rootfs/lib/ld-uClibc.so.0
0x77e97dd0  0x77fb1080  Yes (*)     release_dir/rootfs/usr/lib/libasound.so.2
0x77df82b0  0x77e5e170  Yes (*)     release_dir/rootfs/lib/libdbus-1.so.3

ObjDump of the release_dir/rootfs/usr/lib/ld-uClibc.so.0 :
Contents of section .gnu.attributes:
 0000 410f0000 00676e75 00010700 00000403  A....gnu........
Contents of section .gnu_debuglink:
 0000 6c642d75 436c6962 632e736f 2e302e64  ld-uClibc.so.0.d
 0010 65627567 00000000 d46e2530           ebug.....n%0

crc32 release_dir/debug_symbols/ld-uClibc.so.0.debug
30256ed4

The gnu_debuglink match the crc32.

https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html as
i read it here this should automatically load the debug file matching
the crc32.

I can manually load them with the command add-symbol-file
release_dir/debug_symbols/ld-uClibc.so.0.debug 0x77fdee70

Thanks for you help :)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]