mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2025-12-29 18:54:52 +01:00
Issue 196 - Breakpad processor support for x86-64. r=mento
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@227 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
11e180cd3e
commit
8eb7111814
11 changed files with 833 additions and 216 deletions
|
|
@ -68,6 +68,7 @@ using google_breakpad::StackFrame;
|
|||
using google_breakpad::StackFramePPC;
|
||||
using google_breakpad::StackFrameSPARC;
|
||||
using google_breakpad::StackFrameX86;
|
||||
using google_breakpad::StackFrameAMD64;
|
||||
|
||||
// Separator character for machine readable output.
|
||||
static const char kOutputSeparator = '|';
|
||||
|
|
@ -165,6 +166,16 @@ static void PrintStack(const CallStack *stack, const string &cpu) {
|
|||
sequence = PrintRegister("srr0", frame_ppc->context.srr0, sequence);
|
||||
if (frame_ppc->context_validity & StackFramePPC::CONTEXT_VALID_GPR1)
|
||||
sequence = PrintRegister("r1", frame_ppc->context.gpr[1], sequence);
|
||||
} else if (cpu == "amd64") {
|
||||
const StackFrameAMD64 *frame_amd64 =
|
||||
reinterpret_cast<const StackFrameAMD64*>(frame);
|
||||
|
||||
if (frame_amd64->context_validity & StackFrameAMD64::CONTEXT_VALID_RIP)
|
||||
sequence = PrintRegister("rip", frame_amd64->context.rip, sequence);
|
||||
if (frame_amd64->context_validity & StackFrameAMD64::CONTEXT_VALID_RSP)
|
||||
sequence = PrintRegister("rsp", frame_amd64->context.rsp, sequence);
|
||||
if (frame_amd64->context_validity & StackFrameAMD64::CONTEXT_VALID_RBP)
|
||||
sequence = PrintRegister("rbp", frame_amd64->context.rbp, sequence);
|
||||
} else if (cpu == "sparc") {
|
||||
const StackFrameSPARC *frame_sparc =
|
||||
reinterpret_cast<const StackFrameSPARC*>(frame);
|
||||
|
|
@ -176,7 +187,6 @@ static void PrintStack(const CallStack *stack, const string &cpu) {
|
|||
if (frame_sparc->context_validity & StackFrameSPARC::CONTEXT_VALID_PC)
|
||||
sequence = PrintRegister("pc", frame_sparc->context.pc, sequence);
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue