使用libc的SIGSEGV回溯是重复条目

时间:2012-05-18 10:18:40

标签: c++ c arm libc backtrace

我在移动到可用的execinfo回溯之前使用了libunwind。在实现了一个新的回溯之后,我很享受它,直到我从项目中删除了libunwind并进行了完全重建。

现在我的backtrace函数拒绝从SIGSEGV产生正常结果(我知道从那里做回溯是不安全的),但为什么它之前工作正常呢?

我将暂时发布输出结果不正确。第一个回溯是一个例外,第二个是故意的SIGSEGV - 预期结果将是对__libc_start_main的追踪

我记得我读过有关信号堆叠的问题吗?

ERROR: FatalException detected: Unable to find string Id STR_PATIENT_LIST in configuration xml file at gui.cpp +1224
===========================================
FATAL STACK BACKTRACE
[bt]: (1 ) [0x1aed350]
[bt]: (2 ) ./ambusergm(getStrIdElement(char const*)+0x1a4) [0xa3d6c]
[bt]: (3 ) ./ambusergm(getCurrentLanguageStr(char const*)+0x18) [0xa4968]
[bt]: (4 ) ./ambusergm(createDialogs+0x70) [0xa4ce4]
[bt]: (5 ) ./ambusergm(handleMenuUniqueIdEvent+0x1278) [0x90030]
[bt]: (6 ) ./ambusergm(menuSelectionInvoke(int, int)+0x278) [0xa14ac]
[bt]: (7 ) ./ambusergm(reloadMenu+0xe0) [0xab51c]
[bt]: (8 ) ./ambusergm(main+0x638) [0x600b0]
[bt]: (9 ) /lib/libc.so.6(__libc_start_main+0x120) [0x402f7fd4]
===========================================

signal 11 (Segmentation fault), address is (nil) from 0x166398
===========================================
CRASH STACK BACKTRACE
[bt]: (1 ) ./ambusergm(MessageBoxDlg::Setup(MessageBoxType, int, int, int, int, wchar_t const*, wchar_t const*)+0x10) [0x166398]
[bt]: (2 ) /lib/libc.so.6(__default_rt_sa_restorer_v2+0) [0x4030e630]
[bt]: (3 ) ./ambusergm(MessageBoxDlg::Setup(MessageBoxType, int, int, int, int, wchar_t const*, wchar_t const*)+0x10) [0x166398]

... repeated to the last entry

[bt]: (49) ./ambusergm(MessageBoxDlg::Setup(MessageBoxType, int, int, int, int, wchar_t const*, wchar_t const*)+0x10) [0x166398]
===========================================

1 个答案:

答案 0 :(得分:0)

问题恰巧是应用程序seg在异常处理程序本身出现故障并且recursevly称为segfault信号处理程序