Valgrind失去了符号信息

时间:2010-08-10 23:11:38

标签: dll debugging shared-libraries valgrind

运行Valgrind后,生成的日志文件包含许多看似

的错误
Conditional jump or move depends on uninitialised value(s)
  at 0x3D9863AA: ???
  by 0x3D986287: ???
  by 0x3D9854AC: ???
Uninitialised value was created by a heap allocation
  at 0x7FCC050: operator new(unsigned int) (vg_replace_malloc.c:214)
  by 0x3D9A56A4: ???
  by 0x3D9A4EB9: ???

环顾四周后,我发现以下一行对于获取实际内容非常重要,而不仅仅是???

Discarding syms at 0x3d97dba0-0x3da53de8 in /path/SomeDLL.so due to munmap()

请注意,所有???来自Discarding syms行指定范围内的地址。

是什么导致Valgrind丢弃共享库的符号信息以及如何修复它?

1 个答案:

答案 0 :(得分:3)

也许您的共享库已被dlclose调用卸载。尽量避免这种情况。见Valgrind FAQ