X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ede3a6d68af66772b4f5f94208b4126bab566cc8..4979a56c780fceaa115d055d3c09f5980531c5d3:/src/unix/stackwalk.cpp

diff --git a/src/unix/stackwalk.cpp b/src/unix/stackwalk.cpp
index 9ad52db9e6..d5175464f7 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,12 @@ void wxStackWalker::Walk(size_t skip)
 
     char **symbols = backtrace_symbols(addresses, depth);
 
-    for ( int n = 0; n < depth; n++ )
+    if (skip > (size_t) depth)
+        skip = (size_t) depth;
+
+    for ( int n = skip; n < depth; n++ )
     {
-        wxStackFrame frame(n, addresses[n], symbols[n]);
+        wxStackFrame frame(n, addresses[n-skip], symbols[n-skip]);
         OnStackFrame(frame);
     }
 }