summaryrefslogtreecommitdiff
path: root/src/stacktrace_generic-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stacktrace_generic-inl.h')
-rw-r--r--src/stacktrace_generic-inl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stacktrace_generic-inl.h b/src/stacktrace_generic-inl.h
index 5970d49..7d7c22d 100644
--- a/src/stacktrace_generic-inl.h
+++ b/src/stacktrace_generic-inl.h
@@ -60,13 +60,13 @@
// int max_depth: the size of the result (and sizes) array(s)
// int skip_count: how many stack pointers to skip before storing in result
// void* ucp: a ucontext_t* (GetStack{Trace,Frames}WithContext only)
-int GET_STACK_TRACE_OR_FRAMES {
+static int GET_STACK_TRACE_OR_FRAMES {
static const int kStackLength = 64;
void * stack[kStackLength];
int size;
size = backtrace(stack, kStackLength);
- skip_count++; // we want to skip the current frame as well
+ skip_count += 2; // we want to skip the current and it's parent frame as well
int result_count = size - skip_count;
if (result_count < 0)
result_count = 0;