mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-01-01 12:14:56 +01:00
Breakpad: Add minidump processor support for DWARF Call Frame Information.
Add a CFIFrameInfo class (named for symmetry with WindowsFrameInfo) to represent the set of STACK CFI rules in effect at a given instruction, and apply them to a set of register values. Provide a SimpleCFIWalker class template, to allow the essential CFI code to be shared amongst the different architectures. Teach BasicSourceLineResolver to partially parse 'STACK CFI' records, and produce the set of rules in effect at a given instruction on demand, by combining the initial rule set and the appropriate rule deltas in a CFIFrameInfo object. Adapt StackwalkerX86 and StackFrameX86 to retrieve, store, and apply CFI stack walking information. Add validity flags for all the general-purpose registers to StackFrameX86::ContextValidity. a=jimblandy, r=mmentovai git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@549 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
a7eb2329de
commit
6d3a825dbf
16 changed files with 1850 additions and 46 deletions
|
|
@ -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_;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue