0

Downloaded the core dump locally(core dump was generated by systemd-coredump on the original target and then downloaded to a different location) and using a local copy of GDB to debug, the shared libraries will not load.

(gdb) bt
#0  0x0000007f83148560 in ?? ()

‘info shared’ gives the following output:

(gdb) info shared
No shared libraries loaded at this time.

However, when debugging on the original target with 'coredumpctl debug', all shared libraries load without any issues. The 'info shared' output there is

(gdb) info shared
From                To                  Syms Read   Shared Object Library
0x0000007f854cb070  0x0000007f854cd748  Yes (*)     /lib/libcap.so.2
0x0000007f85474fb0  0x0000007f854a20e8  Yes (*)     /usr/lib/libdbus-1.so.3
0x0000007f85439070  0x0000007f8544aff0  Yes (*)     /lib/libpthread.so.0
                                           and so on ……

Things tried to manually load the shared libraries

  1. Tried setting the solib-search-path to point to the shared libraries using 'set solib-search-path /usr/lib/foo.so' and setting the solib-absolute-prefix to /usr/lib. No acknowledgement was given that foo.so was loaded.

  2. Tried running objdump on the executable, got the list .so libraries, and tried to link them individually by setting the path. That did not load the libraries as well.

  3. Tried running 'sharedlibrary foo' after 'set auto-solib-add off'. Sharedlibrary foo was not loaded.

  4. Tried changing sysroot using the 'set sysroot' command to point to a directory containing the shared libraries in lib/ and usr/lib subdirectories.

Since not able to load the shared libraries manually, the assumption is that the mechanism that provides a way to identify what libraries to load might be broken somehow. Has anyone seen similar before and what can be done to ensure that the shared libraries load? Any help is appreciated. Thanks!

ggdbuser
  • 1
  • 1
  • This is not a duplicate of 'Debugging core files generated on a Customer's box'. The stuff mentioned in the post is already tried and clearly suggests that person who marked this as duplicate didn't go through the detailed steps mentioned in my original post about what things were tried to debug it. Also, doesn't understand that cross compilation aspect of it. The user mentioned having symbol issues and using solib commands that we have already used. We neither have symbol issues nor have any doubts about debugging with cross compilation capabilities. This should be opened up for discussion. – ggdbuser Sep 02 '21 at 21:38

0 Answers0