From 52925cb9b353328090b8a2041a7f99426e826cbe Mon Sep 17 00:00:00 2001 From: "ted.mielczarek@gmail.com" Date: Thu, 31 Jan 2013 19:49:03 +0000 Subject: [PATCH] minidump_stackwalk: Show argument registers for ARM stack traces Patch by Michael Krebs , R=ted at https://breakpad.appspot.com/497002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1108 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/processor/minidump_stackwalk.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/processor/minidump_stackwalk.cc b/src/processor/minidump_stackwalk.cc index e7edc963..3f7df0cf 100644 --- a/src/processor/minidump_stackwalk.cc +++ b/src/processor/minidump_stackwalk.cc @@ -233,6 +233,17 @@ static void PrintStack(const CallStack *stack, const string &cpu) { const StackFrameARM *frame_arm = reinterpret_cast(frame); + // Argument registers (caller-saves), which will likely only be valid + // for the youngest frame. + if (frame_arm->context_validity & StackFrameARM::CONTEXT_VALID_R0) + sequence = PrintRegister("r0", frame_arm->context.iregs[0], sequence); + if (frame_arm->context_validity & StackFrameARM::CONTEXT_VALID_R1) + sequence = PrintRegister("r1", frame_arm->context.iregs[1], sequence); + if (frame_arm->context_validity & StackFrameARM::CONTEXT_VALID_R2) + sequence = PrintRegister("r2", frame_arm->context.iregs[2], sequence); + if (frame_arm->context_validity & StackFrameARM::CONTEXT_VALID_R3) + sequence = PrintRegister("r3", frame_arm->context.iregs[3], sequence); + // General-purpose callee-saves registers. if (frame_arm->context_validity & StackFrameARM::CONTEXT_VALID_R4) sequence = PrintRegister("r4", frame_arm->context.iregs[4], sequence);