diff options
author | bryner <bryner@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2006-09-08 02:35:53 +0000 |
---|---|---|
committer | bryner <bryner@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2006-09-08 02:35:53 +0000 |
commit | d5e66382d10b1570d75e924410d58b47857fe799 (patch) | |
tree | 631ca22ac3409363ae8418c7bc846d9e198bed9f /src/processor/minidump_stackwalk.cc | |
parent | Make SourceLineResolver fill a StackFrame rather than using its own struct (#... (diff) | |
download | breakpad-d5e66382d10b1570d75e924410d58b47857fe799.tar.xz |
Add support to the StackWalker for resolving symbols, using a
caller-implemented SymbolSupplier object to get a symbol file.
Add a CrashReportProcessor object which provides a simple API for processing
a CrashReport struct, given a SymbolSupplier and a minidump file.
r=mmentovai (#17))
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@18 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/processor/minidump_stackwalk.cc')
-rw-r--r-- | src/processor/minidump_stackwalk.cc | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/processor/minidump_stackwalk.cc b/src/processor/minidump_stackwalk.cc index 71948a3b..db4437cd 100644 --- a/src/processor/minidump_stackwalk.cc +++ b/src/processor/minidump_stackwalk.cc @@ -30,13 +30,10 @@ #define open _open #endif // !_WIN32 -#include <memory> - #include "processor/minidump.h" #include "processor/stackwalker_x86.h" -using std::auto_ptr; using namespace google_airbag; @@ -95,17 +92,15 @@ int main(int argc, char** argv) { exit(1); } - StackwalkerX86 stackwalker = StackwalkerX86(context, stack_memory, modules); + StackwalkerX86 stackwalker = StackwalkerX86(context, stack_memory, + modules, NULL, NULL); - auto_ptr<StackFrames> stack(stackwalker.Walk()); - if (!stack.get()) { - fprintf(stderr, "stackwalker->Walk() failed\n"); - exit(1); - } + StackFrames stack; + stackwalker.Walk(&stack); unsigned int index; - for (index = 0 ; index < stack->size() ; index++) { - StackFrame frame = stack->at(index); + for (index = 0 ; index < stack.size() ; index++) { + StackFrame frame = stack.at(index); printf("[%2d] ebp = 0x%08llx eip = 0x%08llx \"%s\" + 0x%08llx\n", index, frame.frame_pointer, |