I am debugging typical C++ Apps that use shared libraries.
For better diagnostics I want to call my own debugging helper functions
(eg. creating a new std::string
) in gdb
that are contained in a shared library.
How can I load my own shared library in gdb
?
I am looking for something like this:
gdb myApp
(gdb) load mySharedLibrary.so # this command does not exist in gdb!
(gdb) breakpoint somewhere
(gdb) run
(gdb) # breakpoint hit
(gdb) print myDebug_function...
Note: Since I don't have the source code I cannot modify the App code to put my debug functions in there...