使用 gdb 在问号中显示段错误进行调试 函数"?? ()"
Debugging with gdb showing segfault in question marks function "?? ()"
我一直在尝试调试gdb的段错误,但它显示错误发生在"??我不明白这句话的意思。有人能给点提示吗?
相关的回溯信息如下。
(gdb) run
> (list-partition gt3 (quote (1 2 3 4 5)))
Program received signal SIGSEGV, Segmentation fault. 0xb7d900ac in ?? () from /lib/i386-linux-gnu/libc.so.6
(gdb) bt 10
#0 0xb7d900ac in ?? () from /lib/i386-linux-gnu/libc.so.6
#1 0xb7d92dec in malloc () from /lib/i386-linux-gnu/libc.so.6
#2 0xb7f8d627 in operator new(unsigned int) () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#3 0xb7f727d4 in std::string::_Rep::_S_create(unsigned int, unsigned int, std::allocator<char> const&) () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#4 0xb7f74a48 in char* std::string::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag) () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#5 0xb7f74bb6 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#6 0x080527fa in SymbolCell::get_symbol (this=0x80641e0) at SymbolCell.cpp:63
#7 0x080524c2 in SymbolCell::get_value (this=0x80641e0) at SymbolCell.cpp:88
#8 0x08053c20 in ConsCell::get_value (this=0x8064190) at ConsCell.cpp:195
#9 0x0804f287 in eval_pure (c=0x8064190) at eval_util.cpp:683 (More stack frames follow...)
另一件值得注意的事情是,程序实际上在生成这个错误之前运行了几秒钟,这在程序的行为上下文中是相当不正常的。
感谢任何建议!提前感谢!
??()
表示gdb找不到符号信息。这对于您的问题来说是不必要的,因为堆栈已经深入到库代码中,并且string/new/malloc已经经过了很好的测试。从SymbolCell::get_symbol
的第6帧开始查找问题
edit:我刚刚注意到你实际上是在运行lisp代码,所以你可能遇到了lisp环境的一些问题,或者更有可能是内存不足。
相关文章:
- 无法使函数公开。获取:"LNK2005"错误。如何调试链接器错误
- 如何调试Cpp程序中的析构函数
- 将C++函数从 DLL 导出为 C 时调试和发布之间的差异
- 调试 - 单步执行 (F11) 不会直接转到函数
- 如何关闭用于在程序中打印调试数据的函数
- 在h文件上内联发布版本并在cpp上实现调试版本的函数
- 使用向量的函数崩溃,调试器说访问冲突读取位置
- 正确编码和调试的命名空间中未解析的函数
- 函数在正常运行时不起作用,但在调试时起作用
- 函数无法正常工作,调试器没有帮助
- OpenGL 调试 错误回调函数的 ID 参数是什么?
- 如何定义具有依赖于符号调试的参数的函数
- 如何调试指针参数是否通过函数修改
- Qtcpserver 仅在调试器下在侦听函数上返回未知错误
- Vulkan API 调试函数指针类型转换错误
- 调试函数参数的值(以C++为单位)
- 如何在C++内联成员函数中添加Android调试函数(LOGE,LOGW..)
- 调试函数的优化代码(带有模板的c++11)
- 在C++中取消调试函数的更好方法
- 使用 gdb 在问号中显示段错误进行调试 函数"?? ()"