aboutsummaryrefslogtreecommitdiff
path: root/src/processor/stackwalker_x86.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/processor/stackwalker_x86.h')
-rw-r--r--src/processor/stackwalker_x86.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/processor/stackwalker_x86.h b/src/processor/stackwalker_x86.h
index 02bda4c3..66b5839c 100644
--- a/src/processor/stackwalker_x86.h
+++ b/src/processor/stackwalker_x86.h
@@ -45,6 +45,7 @@
#include "google_breakpad/common/minidump_format.h"
#include "google_breakpad/processor/stackwalker.h"
#include "google_breakpad/processor/stack_frame_cpu.h"
+#include "src/processor/cfi_frame_info.h"
namespace google_breakpad {
@@ -65,6 +66,9 @@ class StackwalkerX86 : public Stackwalker {
SourceLineResolverInterface *resolver);
private:
+ // A STACK CFI-driven frame walker for the X86.
+ typedef SimpleCFIWalker<u_int32_t, MDRawContextX86> CFIWalker;
+
// Implementation of Stackwalker, using x86 context (%ebp, %esp, %eip) and
// stack conventions (saved %ebp at [%ebp], saved %eip at 4[%ebp], or
// alternate conventions as guided by any WindowsFrameInfo available for the
@@ -79,6 +83,12 @@ class StackwalkerX86 : public Stackwalker {
const vector<StackFrame*> &frames,
WindowsFrameInfo *windows_frame_info);
+ // Use cfi_frame_info (derived from STACK CFI records) to construct
+ // the frame that called frames.back(). The caller takes ownership
+ // of the returned frame. Return NULL on failure.
+ StackFrameX86 *GetCallerByCFIFrameInfo(const vector<StackFrame*> &frames,
+ CFIFrameInfo *cfi_frame_info);
+
// Assuming a traditional frame layout --- where the caller's %ebp
// has been pushed just after the return address and the callee's
// %ebp points to the saved %ebp --- construct the frame that called
@@ -102,6 +112,12 @@ class StackwalkerX86 : public Stackwalker {
// Stores the CPU context corresponding to the innermost stack frame to
// be returned by GetContextFrame.
const MDRawContextX86 *context_;
+
+ // Our register map, for cfi_walker_.
+ static const CFIWalker::RegisterSet cfi_register_map_[];
+
+ // Our CFI frame walker.
+ const CFIWalker cfi_walker_;
};