Breakpad processor: Don't pass Windows stack walking information to all walkers.

At the moment, the StackWalker GetCallerFrame member function expects
a vector of WindowsFrameInfo structures, even though WindowsFrameInfo
is only used or useful on one one implementation (StackWalkerX86).

This patch changes StackWalker::GetCallerFrame to no longer expect the
WindowsFrameInfo structures, and changes all implementations to match.

In particular, StackWalkerX86 is changed to find the WindowsFrameInfo
data itself, and store a pointer to whatever it got in the StackFrame
object itself (which is really a StackFrameX86).

To allow GetCallerFrame implementations to look up stack walking data,
StackWalker::resolver_ needs to be made protected, not private.

a=jimblandy, r=mmentovai


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@491 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
jimblandy 2010-01-14 19:17:36 +00:00
parent 5251e64f48
commit 2684b4dc19
13 changed files with 51 additions and 69 deletions

View file

@ -44,6 +44,8 @@
namespace google_breakpad {
struct WindowsFrameInfo;
struct StackFrameX86 : public StackFrame {
// ContextValidity has one entry for each relevant hardware pointer register
// (%eip and %esp) and one entry for each nonvolatile (callee-save) register.
@ -74,7 +76,9 @@ struct StackFrameX86 : public StackFrame {
StackFrameX86()
: context(),
context_validity(CONTEXT_VALID_NONE),
trust(FRAME_TRUST_NONE) {}
trust(FRAME_TRUST_NONE),
windows_frame_info(NULL) {}
~StackFrameX86();
// Register state. This is only fully valid for the topmost frame in a
// stack. In other frames, the values of nonvolatile registers may be
@ -90,6 +94,11 @@ struct StackFrameX86 : public StackFrame {
// Amount of trust the stack walker has in the instruction pointer
// of this frame.
FrameTrust trust;
// Any stack walking information we found describing
// this.instruction. These may be NULL if we couldn't find the
// appropriate information.
WindowsFrameInfo *windows_frame_info;
};
struct StackFramePPC : public StackFrame {