summaryrefslogtreecommitdiff
path: root/src/stacktrace_instrument-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stacktrace_instrument-inl.h')
-rwxr-xr-xsrc/stacktrace_instrument-inl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stacktrace_instrument-inl.h b/src/stacktrace_instrument-inl.h
index c99c4de..c631765 100755
--- a/src/stacktrace_instrument-inl.h
+++ b/src/stacktrace_instrument-inl.h
@@ -130,14 +130,14 @@ static int cyg_backtrace(void **buffer, int size) {
// 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;
memset(stack, 0, sizeof(stack));
size = cyg_backtrace(stack, kStackLength);
- skip_count++; // we want to skip the current frame as well
+ skip_count += 2; // we want to skip the current and parent frame as well
int result_count = size - skip_count;
if (result_count < 0)
result_count = 0;