aboutsummaryrefslogtreecommitdiff
path: root/src/processor/stackwalker_ppc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/processor/stackwalker_ppc.cc')
-rw-r--r--src/processor/stackwalker_ppc.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/processor/stackwalker_ppc.cc b/src/processor/stackwalker_ppc.cc
index 7e208844..c9ab144f 100644
--- a/src/processor/stackwalker_ppc.cc
+++ b/src/processor/stackwalker_ppc.cc
@@ -130,6 +130,14 @@ StackFrame* StackwalkerPPC::GetCallerFrame(const CallStack* stack,
StackFramePPC::CONTEXT_VALID_GPR1;
frame->trust = StackFrame::FRAME_TRUST_FP;
+ // Should we terminate the stack walk? (end-of-stack or broken invariant)
+ if (TerminateWalk(instruction,
+ stack_pointer,
+ last_frame->context.gpr[1],
+ stack->frames()->size() == 1)) {
+ return NULL;
+ }
+
// frame->context.srr0 is the return address, which is one instruction
// past the branch that caused us to arrive at the callee. Set
// frame_ppc->instruction to four less than that. Since all ppc