]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/stackwalk.cpp
fixing changing text colors
[wxWidgets.git] / src / unix / stackwalk.cpp
index d5175464f77fab2737dadd6da93ff94f1b86404c..ae48c30a31cbd3b0a81433e6672901879abd0923 100644 (file)
@@ -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);
     }
 }