I have an executable that dynamically loads a shared object library, let say foo.so. I do not build foo.so and it is given to me as a library to use in my code. foo.cpp compiles to give foo.so. I do not have access to foo.cpp but have foo.so. I want to set a breakpoint when my executable calls a function inside this shared library foo.so (that is when function inside foo.cpp is called). Is their a way in gdb to do so? I have tried
gdb funcname
but it does not seem to work. Any pointers how to break gdb at that point?