X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1872e04240deee7d7415a942131ee86862742dc9..9c8cfcb9c56798ebd29184e40227451a194c0c49:/src/unix/stackwalk.cpp diff --git a/src/unix/stackwalk.cpp b/src/unix/stackwalk.cpp index d5175464f7..ae48c30a31 100644 --- a/src/unix/stackwalk.cpp +++ b/src/unix/stackwalk.cpp @@ -225,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); } }