English 中文(简体)
gdb 中的未解解调试符号
原标题:Unresolved debugging symbols in gdb

我在Montavista Linux 上运行的电源平台的应用程序之一已经崩溃。 顶层 3 层框显示绝对地址, 而不是符号 。 我的建构机器在不同的平台上托管, 我正使用一个十字路口验证器来构建应用程序 。 我怎样才能恢复这些符号 。

反向跟踪如下:

#0  0x0f272adc in ?? () from /lib/libc.so.6
#1  0x0f3537fc in ?? () from /lib/libc.so.6
#2  0x0f274f44 in ?? () from /lib/libc.so.6
#3  0x0f276e94 in malloc () from /lib/libc.so.6
#4  0x105c94a8 in fast_memget (module_id=0, noctets=820, err=0x3893e710) at ../common/src/portlayer.c:1305
#5  0x1055f734 in glbSipParserDecodeMessage (
    message=0x3b225e58 "SIP/2.0 200 OK
Via: SIP/2.0/TCP 10.194.182.55:5060;branch=z9hG4bK2495419925-4086;received=10.194.182.55;ingress-zone=mxenode51
Call-ID: 2469861343-4086
CSeq: 6 INFO
Contact: <sip:[email protected]"..., opt=0x3893e70c, messageLength=425, nextmesg=0x3893e898, pContext=0x3893e8cc, ppSipMessage=0x3893e6bc, err=0x3893e710) at src/sipdecode.c:6184
问题回答

您需要用调试信息安装 C 库( libc) 。 在 Debian 或衍生系统( 例如 Ubuntu) 上, 它是一个名为 < code > libc6- dbg 的软件包 。

我说最后三个框架似乎没有有效信息。 猜测: 可能有些组装功能来自集市( 虽然这些框架也许可以读取 ) 。

但既然你确实知道同一图书馆的百货公司地址, 你可以计算出个人电脑在这个框中的相对差异(例如: -1f50为框架#2)。 使用你的交叉工具链, 并用它来折叠 - dlibc.so, 并检查百货公司的代码—— 这个差异...

考虑到评论中的额外信息,

应用程序是否以优化方式(- O1, - O2, etcs) 编译? 如果是的话, 则在没有这些选项的情况下重新拼凑 。 我亲自在 Cavium Octeneon( MIPS) 上交叉拼凑, 发现优化旗的存在会给看到符号带来问题 。

堆栈会不会被损坏了? 如果是这样的话, 我认为所有的架子都会被损坏。 您是否有可能使用Valgrind这样的工具来查看您是否在某个地方的记忆力? 或者至少运行 Linux 上的应用程序?

在继续前进之前, 您是否真的需要了解关于前三个框架的更多信息? 您是否知道它坠毁在商场是否足够? 您是否应该考虑一下在商场坠毁的原因。 在之前提到的同一个Cavium平台中, 我们遇到一个问题, 即如果在没有记忆时我们称之为商场/新, 那么系统会崩溃 : ( 即使在通知了他们虫子之后, 我们不得不使用黑客式的工作替代方法 ) 。 您在调用商场/ 新的时是否正在查看 NULL? 如果您从多个不同的地方调用它, 这可能会很困难 。 我们有新的/ 商场包装了, 所以这对我们来说很容易做到 。

在业务干事提出更多评论后更新最新情况

如果您因内存泄漏而失去记忆, 它不应该崩溃, 但尝试检查中转器不会返回 NULL。 您也应该考虑使用“ 停止记忆处理器”, 上面提到 < a href=" https:// stackoverflow. com/q/5548639/1158895 > 这里

在同一个Cavium平台上,我们也有类似的记忆腐败问题,很难追踪到(我们无法在Linux和Valgrind一起运行 ) 。 每次我们做麦片时,我们都找到了一种检查内部记忆头的正确性的方法。 这确实拖慢了它的速度,但最终却让我们找到了问题。如果你无法接触到类似的东西,或者Linux上的Valgrind, 你可以考虑用“包扎”马洛克/新来实施它。 这将非常复杂,但可能是最糟糕的情况。





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签