diff options
author | mmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2006-10-20 01:46:38 +0000 |
---|---|---|
committer | mmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2006-10-20 01:46:38 +0000 |
commit | 246f4068280b5b191303ff13671e43a0522987de (patch) | |
tree | 9de2b66c7d8f0241de53669de045318d6283da7e /src/processor/minidump_stackwalk.cc | |
parent | Improvements for Windows client/tool-side code. r=bryner (diff) | |
download | breakpad-246f4068280b5b191303ff13671e43a0522987de.tar.xz |
Handle frame pointer omission, (#21), part 4 (final part!): FPO stackwalker.
r=bryner
- This change allows Airbag to properly walk win32 stacks produced by code
built with MSVC's frame pointer omission optimization (/Oy). This
optimization is enabled at /O1 and /O2.
- There too many interface and file format changes to list here.
http://groups.google.com/group/airbag-dev/browse_thread/thread/85ce85bfa8457ece
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@42 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/processor/minidump_stackwalk.cc')
-rw-r--r-- | src/processor/minidump_stackwalk.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/processor/minidump_stackwalk.cc b/src/processor/minidump_stackwalk.cc index 3620e30c..a7d57f3c 100644 --- a/src/processor/minidump_stackwalk.cc +++ b/src/processor/minidump_stackwalk.cc @@ -38,12 +38,15 @@ #include <memory> #include <string> +#include "google/call_stack.h" +#include "google/stack_frame.h" #include "processor/minidump.h" #include "processor/stackwalker_x86.h" using std::auto_ptr; using std::string; +using google_airbag::CallStack; using google_airbag::MemoryRegion; using google_airbag::Minidump; using google_airbag::MinidumpContext; @@ -52,7 +55,6 @@ using google_airbag::MinidumpModuleList; using google_airbag::MinidumpThread; using google_airbag::MinidumpThreadList; using google_airbag::StackFrame; -using google_airbag::StackFrames; using google_airbag::Stackwalker; @@ -112,18 +114,17 @@ int main(int argc, char **argv) { exit(1); } - StackFrames stack; + CallStack stack; stackwalker->Walk(&stack); unsigned int 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", + for (index = 0; index < stack.frames()->size(); ++index) { + StackFrame *frame = stack.frames()->at(index); + printf("[%2d] instruction = 0x%08llx \"%s\" + 0x%08llx\n", index, - frame.frame_pointer, - frame.instruction, - frame.module_base ? frame.module_name.c_str() : "0x0", - frame.instruction - frame.module_base); + frame->instruction, + frame->module_base ? frame->module_name.c_str() : "0x0", + frame->instruction - frame->module_base); } return 0; |