3

i'm using gdb 7.2 on ubuntu 10.10

while stepping with step i get to a point that looks (literally) like this:

0x00130a2c in boost::contexts::context::impl_t::impl_t(void (*)(void*), void*, unsigned int, boost::contexts::context::impl_t*, std::auto_ptr<boost::contexts::context::allocator_base>) () from /home/lurscher/third_party/boost_1_45_0/stage/lib/libboost_context.so.1.45.0

So i want now to associate the appropiate source files; which likely should be on /home/lurscher/third_party/boost_1_45_0/boost/context and /home/lurscher/third_party/boost_1_45_0/libs/context.

But the truth is i'm not sure how to achieve this, its been years since i had to debug in terminal mode

1
  • What happens if you just step? On my setup gdb just finds it. Commented Jan 26, 2011 at 4:56

2 Answers 2

4

You can compile the third-party library with debugging symbols, and those debugging symbols will chain [i.e. if your app is compiled with debugging symbols, you can step through and see the source lines even within the library]

boost jam takes a debug argument which will instruct it to build a debug version.

in gcc, debug symbols is -g

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

1 Comment

what if the library has been compiled with -g (or -ggdb for what matters) and I still can't step into it? I've seen source information with objdump -S
2

If your library is compiled in the debug mode, but GDB just doesn't find the sources, you should use the dir command to add the source directory to the search list.

Comments

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.