I have a kernel when running the application, and I saved the executable, the main file, and the shared library that the application uses in /tmpto check them later. Then I modified the library, rebuilt it, and ran the executable again. Now when I try to debug the kernel, gdb loads the shared library from the source path, not from the directory /tmpwhere I saved the source library.
For example, the original path was /opt/mydir/lib/libmylib.so.0. gdb is loading this shared library, and I want it to load /tmp/libmylib.so.0. The application also uses some standard libraries that are in directories /usr/liband /libtherefore I do not want these paths to change. Just want to change /opt/mydir/lib/→ /tmp. How can i do this?
source
share