mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2025-12-26 17:25:04 +01:00
Refactor the logic of resolving source line info into helper class.
http://breakpad.appspot.com/459002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1068 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
f72b9c6ff4
commit
bab770045b
22 changed files with 813 additions and 926 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// -*- mode: c++ -*-
|
||||
// -*- mode: c++ -*-
|
||||
|
||||
// Copyright (c) 2010 Google Inc.
|
||||
// All rights reserved.
|
||||
|
|
@ -40,6 +40,7 @@
|
|||
#ifndef PROCESSOR_STACKWALKER_X86_H__
|
||||
#define PROCESSOR_STACKWALKER_X86_H__
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "google_breakpad/common/breakpad_types.h"
|
||||
#include "google_breakpad/common/minidump_format.h"
|
||||
|
|
@ -58,12 +59,11 @@ class StackwalkerX86 : public Stackwalker {
|
|||
// register state corresponding to the innermost called frame to be
|
||||
// included in the stack. The other arguments are passed directly through
|
||||
// to the base Stackwalker constructor.
|
||||
StackwalkerX86(const SystemInfo *system_info,
|
||||
const MDRawContextX86 *context,
|
||||
MemoryRegion *memory,
|
||||
const CodeModules *modules,
|
||||
SymbolSupplier *supplier,
|
||||
SourceLineResolverInterface *resolver);
|
||||
StackwalkerX86(const SystemInfo* system_info,
|
||||
const MDRawContextX86* context,
|
||||
MemoryRegion* memory,
|
||||
const CodeModules* modules,
|
||||
StackFrameSymbolizer* frame_symbolizer);
|
||||
|
||||
private:
|
||||
// A STACK CFI-driven frame walker for the X86.
|
||||
|
|
@ -73,32 +73,32 @@ class StackwalkerX86 : public Stackwalker {
|
|||
// stack conventions (saved %ebp at [%ebp], saved %eip at 4[%ebp], or
|
||||
// alternate conventions as guided by any WindowsFrameInfo available for the
|
||||
// code in question.).
|
||||
virtual StackFrame *GetContextFrame();
|
||||
virtual StackFrame *GetCallerFrame(const CallStack *stack);
|
||||
virtual StackFrame* GetContextFrame();
|
||||
virtual StackFrame* GetCallerFrame(const CallStack* stack);
|
||||
|
||||
// Use windows_frame_info (derived from STACK WIN and FUNC records)
|
||||
// to construct the frame that called frames.back(). The caller
|
||||
// takes ownership of the returned frame. Return NULL on failure.
|
||||
StackFrameX86 *GetCallerByWindowsFrameInfo(
|
||||
StackFrameX86* GetCallerByWindowsFrameInfo(
|
||||
const vector<StackFrame*> &frames,
|
||||
WindowsFrameInfo *windows_frame_info);
|
||||
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);
|
||||
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
|
||||
// frames.back(). The caller takes ownership of the returned frame.
|
||||
// Return NULL on failure.
|
||||
StackFrameX86 *GetCallerByEBPAtBase(const vector<StackFrame*> &frames);
|
||||
StackFrameX86* GetCallerByEBPAtBase(const vector<StackFrame*> &frames);
|
||||
|
||||
// Stores the CPU context corresponding to the innermost stack frame to
|
||||
// be returned by GetContextFrame.
|
||||
const MDRawContextX86 *context_;
|
||||
const MDRawContextX86* context_;
|
||||
|
||||
// Our register map, for cfi_walker_.
|
||||
static const CFIWalker::RegisterSet cfi_register_map_[];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue