4

I am using gdb to debug a package that is using an external library. I have the source code of the external library. How do I make gdb load this source code as well? Thank you!

2 Answers 2

3

To make GDB find sources for the library, use the dir command. More info here.

Sign up to request clarification or add additional context in comments.

Comments

1

Do you know if the external library was compiled with the "include debugging symbols" flag set? I assume it was not. If you can recompile with that flag set it will make debugging easier.

1 Comment

An example using gcc: gcc -g main.c -g library.h -g library.c -o main

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.