From 9276b0d3017ad5ca93c8b593cacf317e1eaa114e Mon Sep 17 00:00:00 2001 From: "ted.mielczarek" Date: Sat, 19 Dec 2009 21:43:53 +0000 Subject: Basic arm cpu support for processor. r=mark at http://breakpad.appspot.com/49011 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@454 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/google_breakpad/processor/minidump.h | 8 +++++--- src/google_breakpad/processor/stack_frame_cpu.h | 27 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 3 deletions(-) (limited to 'src/google_breakpad/processor') diff --git a/src/google_breakpad/processor/minidump.h b/src/google_breakpad/processor/minidump.h index 695a7254..2a83c3f0 100644 --- a/src/google_breakpad/processor/minidump.h +++ b/src/google_breakpad/processor/minidump.h @@ -179,10 +179,11 @@ class MinidumpContext : public MinidumpStream { // Returns raw CPU-specific context data for the named CPU type. If the // context data does not match the CPU type or does not exist, returns // NULL. - const MDRawContextX86* GetContextX86() const; - const MDRawContextPPC* GetContextPPC() const; const MDRawContextAMD64* GetContextAMD64() const; + const MDRawContextARM* GetContextARM() const; + const MDRawContextPPC* GetContextPPC() const; const MDRawContextSPARC* GetContextSPARC() const; + const MDRawContextX86* GetContextX86() const; // Print a human-readable representation of the object to stdout. void Print(); @@ -216,7 +217,8 @@ class MinidumpContext : public MinidumpStream { MDRawContextAMD64* amd64; // on Solaris SPARC, sparc is defined as a numeric constant, // so variables can NOT be named as sparc - MDRawContextSPARC* ctx_sparc; + MDRawContextSPARC* ctx_sparc; + MDRawContextARM* arm; } context_; }; diff --git a/src/google_breakpad/processor/stack_frame_cpu.h b/src/google_breakpad/processor/stack_frame_cpu.h index 3d3003b7..1e414638 100644 --- a/src/google_breakpad/processor/stack_frame_cpu.h +++ b/src/google_breakpad/processor/stack_frame_cpu.h @@ -168,6 +168,33 @@ struct StackFrameSPARC : public StackFrame { int context_validity; }; +struct StackFrameARM : public StackFrame { + // ContextValidity should eventually contain entries for the validity of + // other nonvolatile (callee-save) registers as in + // StackFrameX86::ContextValidity. I suspect this list is sufficient + // for arm stackwalking. + enum ContextValidity { + CONTEXT_VALID_NONE = 0, + CONTEXT_VALID_R13 = 1 << 0, + CONTEXT_VALID_R14 = 1 << 1, + CONTEXT_VALID_R15 = 1 << 2, + CONTEXT_VALID_ALL = -1 + }; + + StackFrameARM() : context(), context_validity(CONTEXT_VALID_NONE) {} + + // Register state. This is only fully valid for the topmost frame in a + // stack. In other frames, the values of nonvolatile registers may be + // present, given sufficient debugging information. Refer to + // context_validity. + MDRawContextARM context; + + // context_validity is actually ContextValidity, but int is used because + // the OR operator doesn't work well with enumerated types. This indicates + // which fields in context are valid. + int context_validity; +}; + } // namespace google_breakpad #endif // GOOGLE_BREAKPAD_PROCESSOR_STACK_FRAME_CPU_H__ -- cgit v1.2.1