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:
SiyangXie@gmail.com
2012-10-10 21:41:52 +00:00
parent f72b9c6ff4
commit bab770045b
22 changed files with 813 additions and 926 deletions

View File

@@ -54,13 +54,12 @@ class StackwalkerARM : 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.
StackwalkerARM(const SystemInfo *system_info,
const MDRawContextARM *context,
StackwalkerARM(const SystemInfo* system_info,
const MDRawContextARM* context,
int fp_register,
MemoryRegion *memory,
const CodeModules *modules,
SymbolSupplier *supplier,
SourceLineResolverInterface *resolver);
MemoryRegion* memory,
const CodeModules* modules,
StackFrameSymbolizer* frame_symbolizer);
// Change the context validity mask of the frame returned by
// GetContextFrame to VALID. This is only for use by unit tests; the
@@ -70,25 +69,25 @@ class StackwalkerARM : public Stackwalker {
private:
// Implementation of Stackwalker, using arm context and stack conventions.
virtual StackFrame* GetContextFrame();
virtual StackFrame* GetCallerFrame(const CallStack *stack);
virtual StackFrame* GetCallerFrame(const CallStack* stack);
// 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.
StackFrameARM *GetCallerByCFIFrameInfo(const vector<StackFrame *> &frames,
CFIFrameInfo *cfi_frame_info);
StackFrameARM* GetCallerByCFIFrameInfo(const vector<StackFrame*> &frames,
CFIFrameInfo* cfi_frame_info);
// Use the frame pointer. The caller takes ownership of the returned frame.
// Return NULL on failure.
StackFrameARM *GetCallerByFramePointer(const vector<StackFrame *> &frames);
StackFrameARM* GetCallerByFramePointer(const vector<StackFrame*> &frames);
// Scan the stack for plausible return addresses. The caller takes ownership
// of the returned frame. Return NULL on failure.
StackFrameARM *GetCallerByStackScan(const vector<StackFrame *> &frames);
StackFrameARM* GetCallerByStackScan(const vector<StackFrame*> &frames);
// Stores the CPU context corresponding to the youngest stack frame, to
// be returned by GetContextFrame.
const MDRawContextARM *context_;
const MDRawContextARM* context_;
// The register to use a as frame pointer. The value is -1 if frame pointer
// cannot be used.