I have a C program foo which I am compiling and debugging with GDB just fine. (I'm using QtCreator as an IDE if relevant).
When I call function bar(), in library libbar.so.1, in debian package libbar1, I don't get the expected result so I'd like to step into it.
apt source libbar1gets sources forlibbar.so.1and I've found the implementation ofbar()in/tmp/libbar-1.0/src/bar.c.apt install libbar1-dbgsyminstalls the debugging symbols to/usr/lib/debug/.build-id/{22,fb}/*.debug
How can I debug foo and step into the implementation of bar() in GDB?
I suspect I must have to add startup commands to GDB with the location of debug symbols and sources.
I've tried adding this to gdb startup commands:
> directory /tmp/libbar-1.0/src/
Next, I'm thinking it might be related to set substitute-path from to, but I'm not sure whether /tmp/libbar-1.0/src goes in from or to and what the other one would be.