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
This commit is contained in:
parent
e53e6af0c1
commit
e87521a989
1 changed files with 4 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue