|
My typical workflow is to extract tarballs for the executables, debug symbols, and core dumps into the source-mongodb-mongo-master-xx directory and then to invoke gdb as follows. For --link-model=dynamic builds, gdb fails to read the debug symbols from the dist-test/lib/ directory.
$ /opt/mongodbtoolchain/gdb/bin/gdb ./dist-test/bin/mongod ./dump_js.15583.core
|
...
|
warning: Could not load shared library symbols for 605 libraries, e.g. /data/mci/fb4e7f494e41a1298b97bc36d5110734/src/dist-test/bin/../lib/libmongod_main.so.
|
Use the "info sharedlibrary" command to see the complete listing.
|
Do you need "set solib-search-path" or "set sysroot"?
|
...
|
(gdb) info sharedlibrary
|
From To Syms Read Shared Object Library
|
No /data/mci/fb4e7f494e41a1298b97bc36d5110734/src/dist-test/bin/../lib/libmongod_main.so
|
Creating the /data/mci/fb4e7f494e41a1298b97bc36d5110734/src/ directory and extracting the executables and debug symbols (i.e. the dist-test/ directory) into it addresses this issue but is a hassle.
Setting the following search path for shared objects also addresses the issue for me. Is there a way to make this more automatic?
(gdb) set solib-search-path ./dist-test/lib
|
Reading symbols from /data/mci/source-mongodb-mongo-master-601e8c/dist-test/lib/libmongod_main.so...
|
Reading symbols from /data/mci/source-mongodb-mongo-master-601e8c/dist-test/lib/libmongod_main.so.debug...
|
...
|
|