diff options
author | mmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2006-12-12 21:51:36 +0000 |
---|---|---|
committer | mmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2006-12-12 21:51:36 +0000 |
commit | fb35cf79e290fc14b544f41157231d36d57dd213 (patch) | |
tree | ba08b87453d686859738cfeadf580c96911a5d50 | |
parent | Add an abstract interface to SourceLineResolver, and allow any implementation (diff) | |
download | breakpad-fb35cf79e290fc14b544f41157231d36d57dd213.tar.xz |
Fix stackwalker_selftest following #89 (#95). r=bryner
http://groups.google.com/group/airbag-dev/browse_thread/thread/d6d6a83ec41f4e0f
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@84 4c0a9323-5329-0410-9bdc-e9ce6186880e
-rw-r--r-- | src/processor/stackwalker_selftest.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/processor/stackwalker_selftest.cc b/src/processor/stackwalker_selftest.cc index e645dd98..af76a8e8 100644 --- a/src/processor/stackwalker_selftest.cc +++ b/src/processor/stackwalker_selftest.cc @@ -56,12 +56,14 @@ #include "google_airbag/common/airbag_types.h" #include "google_airbag/common/minidump_format.h" +#include "google_airbag/processor/basic_source_line_resolver.h" #include "google_airbag/processor/call_stack.h" #include "google_airbag/processor/memory_region.h" #include "google_airbag/processor/stack_frame.h" #include "google_airbag/processor/stack_frame_cpu.h" #include "processor/scoped_ptr.h" +using google_airbag::BasicSourceLineResolver; using google_airbag::CallStack; using google_airbag::MemoryRegion; using google_airbag::scoped_ptr; @@ -236,14 +238,15 @@ static unsigned int CountCallerFrames() { &resolver); #endif // __i386__ || __ppc__ - scoped_ptr<CallStack> stack(stackwalker.Walk()); + CallStack stack; + stackwalker.Walk(&stack); #ifdef PRINT_STACKS printf("\n"); for (unsigned int frame_index = 0; - frame_index < stack->frames()->size(); + frame_index < stack.frames()->size(); ++frame_index) { - StackFrame *frame = stack->frames()->at(frame_index); + StackFrame *frame = stack.frames()->at(frame_index); printf("frame %-3d instruction = 0x%08llx", frame_index, frame->instruction); #if defined(__i386__) @@ -259,8 +262,8 @@ static unsigned int CountCallerFrames() { // Subtract 1 because the caller wants the number of frames beneath // itself. Because the caller called us, subract two for our frame and its - // frame, which are included in stack->size(). - return stack->frames()->size() - 2; + // frame, which are included in stack.size(). + return stack.frames()->size() - 2; } |