There are two cases to consider (and your question does not make it clear in which case you have):
- your executable file is directly linked to the shared library:
this means that GDB will βseeβ the characters (and sources) from the shared library when you stop at the main
- your executable file dynamically loads the shared library (e.g. via dlopen ):
in this case, GDB will not βseeβ your shared library until dlopen completes.
Since you cannot see the symbols when you stop at the main thing, I assume that you have a second case. You can do "set stop-on-solib-events 1" at the prompt (gdb) , and GDB will stop every time a new shared library is loaded (or unloaded).
You can see which GDB libraries "knows" about with the info shared command.
Wait until you see your target library on this list before trying to set breakpoints in it.
Employed Russian
source share