X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ede3a6d68af66772b4f5f94208b4126bab566cc8..cdf003d46547475ab3fe3d770467458b124c6868:/src/unix/stackwalk.cpp diff --git a/src/unix/stackwalk.cpp b/src/unix/stackwalk.cpp index 9ad52db9e6..ae48c30a31 100644 --- a/src/unix/stackwalk.cpp +++ b/src/unix/stackwalk.cpp @@ -129,9 +129,13 @@ void wxStackFrame::OnGetName() m_offset = ofs; } } - } - m_module.assign(syminfo, posOpen); + m_module.assign(syminfo, posOpen); + } + else // not in "module(funcname+offset)" format + { + m_module = syminfo; + } } void wxStackFrame::OnGetLocation() @@ -221,9 +225,13 @@ void wxStackWalker::Walk(size_t skip) char **symbols = backtrace_symbols(addresses, depth); - for ( int n = 0; n < depth; n++ ) + // we have 3 more "intermediate" frames which the calling code doesn't know + // about., account for them + skip += 3; + + for ( int n = skip; n < depth; n++ ) { - wxStackFrame frame(n, addresses[n], symbols[n]); + wxStackFrame frame(n - skip, addresses[n], symbols[n]); OnStackFrame(frame); } }