加载共享库的gdb源 [英] loading gdb source for a shared library

查看:136
本文介绍了加载共享库的gdb源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在ubuntu 10.10上使用gdb 7.2

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

所以我想把适当的源文件;这可能应该在 / home / lurscher / third_party / boost_1_45_0 / boost / context / home / lurscher / third_party / boost_1_45_0 / libs / / code>。

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

推荐答案

您可以使用调试符号编译第三方库,这些调试符号将链[ie如果您的应用程序使用调试符号编译,您可以通过查看源代码行甚至在库中]

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需要一个调试参数,调试版本。

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

在gcc中,调试符号是-g

in gcc, debug symbols is -g

这篇关于加载共享库的gdb源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆