aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-02-05 17:14:12 +0000
committerjimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-02-05 17:14:12 +0000
commite87521a98962f8b9714860d8a151083d99160cc7 (patch)
treefe61f0925acab64bc5f334bd577c895dd8eb951f
parentBreakpad Linux dumper: Recognize more processor architectures. (diff)
downloadbreakpad-e87521a98962f8b9714860d8a151083d99160cc7.tar.xz
Breakpad processor: Save Windows unwinding data earlier in x86 walker.
At the moment, StackwalkerX86::GetCallerFrame doesn't save the WindowsFrameInfo that it finds for a frame unless it successfully constructs the caller frame. This means that the windows_frame_info field of the last frame on the stack is left unset, even when that frame does have windows unwinding information. This is not user-visible behavior, so it doesn't matter, but it is a blemish on the interface, and unit tests (added in a later patch) expect it. This patch saves the information in the frame as soon as we find it. a=jimblandy, r=mmentovai git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@508 4c0a9323-5329-0410-9bdc-e9ce6186880e
-rw-r--r--src/processor/stackwalker_x86.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/processor/stackwalker_x86.cc b/src/processor/stackwalker_x86.cc
index 27fdc09c..747b5e3a 100644
--- a/src/processor/stackwalker_x86.cc
+++ b/src/processor/stackwalker_x86.cc
@@ -103,6 +103,10 @@ StackFrame* StackwalkerX86::GetCallerFrame(const CallStack *stack) {
WindowsFrameInfo *last_frame_info
= resolver_->FindWindowsFrameInfo(last_frame);
+ // Save the stack walking info we found, in case we need it later to
+ // find the callee of the frame we're constructing now.
+ last_frame->windows_frame_info = last_frame_info;
+
// This stackwalker sets each frame's %esp to its value immediately prior
// to the CALL into the callee. This means that %esp points to the last
// callee argument pushed onto the stack, which may not be where %esp points
@@ -442,9 +446,6 @@ StackFrame* StackwalkerX86::GetCallerFrame(const CallStack *stack) {
// StackFrameX86.
frame->instruction = frame->context.eip - 1;
- // Save the stack walking info we found for the callee.
- last_frame->windows_frame_info = last_frame_info;
-
return frame;
}