Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what command in gdb is same as pathmap in dbx?

Tags:

c++

linux

c++11

When I use gdb on a coredump it reports some .so it cannot find in a certain path. For example:

Symbol file not found for /root/a/xx.so

I do not have administrator rights to create a directory in root, but I do have the xx.so, and in dbx, I can use pathmap to change the path where I can continue the debug. But in gdb I cannot find the same command.

In addition, I do not have the rights to change the compiler command. That is to say, I can't change the linker path to re-compile.

like image 593
yiweng Avatar asked May 28 '26 13:05

yiweng


1 Answers

It sounds like you want set solib-search-path, which takes a colon-delimited list of directory names to search for shared libraries when searching in sysroot fails.

A related command, set sysroot (a.k.a set solib-absolute-prefix), allows you to set any directory as the root used for loading libraries with absolute path names, but you would need to insure that the libraries are laid out in the proper directory structure under the new root, and it sounds like you don't want to do this.

like image 146
Aaron Hays Avatar answered May 31 '26 06:05

Aaron Hays



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!