aboutsummaryrefslogtreecommitdiff
path: root/src/google_breakpad/processor
diff options
context:
space:
mode:
authormmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e>2007-09-26 18:28:05 +0000
committermmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e>2007-09-26 18:28:05 +0000
commitea2bba970675e01f9964f82d3f44960c1aad05dc (patch)
treed3d6744bf2ef136f9a89748c96ab4e5c465eb7ff /src/google_breakpad/processor
parentFix crash reason switching to allow proper behavior for Linux. Spotted by (diff)
downloadbreakpad-ea2bba970675e01f9964f82d3f44960c1aad05dc.tar.xz
Add SPARC/Solaris support to client handler and processor (#201, 200).
Patch by Michael shang <satisfy123>. r=me, r=Alfred Peng. http://groups.google.com/group/google-breakpad-discuss/browse_thread/thread/2fba07577f1fa35e git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@215 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/google_breakpad/processor')
-rw-r--r--src/google_breakpad/processor/minidump.h6
-rw-r--r--src/google_breakpad/processor/stack_frame_cpu.h24
2 files changed, 29 insertions, 1 deletions
diff --git a/src/google_breakpad/processor/minidump.h b/src/google_breakpad/processor/minidump.h
index f40f4c06..55b09533 100644
--- a/src/google_breakpad/processor/minidump.h
+++ b/src/google_breakpad/processor/minidump.h
@@ -177,7 +177,8 @@ class MinidumpContext : public MinidumpStream {
// NULL.
const MDRawContextX86* GetContextX86() const;
const MDRawContextPPC* GetContextPPC() const;
-
+ const MDRawContextSPARC* GetContextSPARC() const;
+
// Print a human-readable representation of the object to stdout.
void Print();
@@ -204,6 +205,9 @@ class MinidumpContext : public MinidumpStream {
MDRawContextBase* base;
MDRawContextX86* x86;
MDRawContextPPC* ppc;
+ // on Solaris SPARC, sparc is defined as a numeric constant,
+ // so variables can NOT be named as sparc
+ MDRawContextSPARC* ctx_sparc;
} context_;
};
diff --git a/src/google_breakpad/processor/stack_frame_cpu.h b/src/google_breakpad/processor/stack_frame_cpu.h
index 8af5ffee..567c1b7e 100644
--- a/src/google_breakpad/processor/stack_frame_cpu.h
+++ b/src/google_breakpad/processor/stack_frame_cpu.h
@@ -98,6 +98,30 @@ struct StackFramePPC : public StackFrame {
int context_validity;
};
+struct StackFrameSPARC : public StackFrame {
+ // to be confirmed
+ enum ContextValidity {
+ CONTEXT_VALID_NONE = 0,
+ CONTEXT_VALID_PC = 0 << 0,
+ CONTEXT_VALID_SP = 0 << 1,
+ CONTEXT_VALID_FP = 0 << 2,
+ CONTEXT_VALID_ALL = -1
+ };
+
+ StackFrameSPARC() : 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.
+ MDRawContextSPARC 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__