X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2c9b3131193fc908c81eb2dc2f23a30c83cc64f4..f46ad98f0df1e1b073a484cb34a91e2e1278fdb7:/src/unix/stackwalk.cpp diff --git a/src/unix/stackwalk.cpp b/src/unix/stackwalk.cpp index b8b92ef924..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,12 +225,13 @@ void wxStackWalker::Walk(size_t skip) char **symbols = backtrace_symbols(addresses, depth); - if (skip > (size_t) depth) - skip = (size_t) depth; + // 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-skip], symbols[n-skip]); + wxStackFrame frame(n - skip, addresses[n], symbols[n]); OnStackFrame(frame); } }