aboutsummaryrefslogtreecommitdiff
path: root/libgcc/config/rs6000/linux-unwind.h
diff options
context:
space:
mode:
Diffstat (limited to 'libgcc/config/rs6000/linux-unwind.h')
-rw-r--r--libgcc/config/rs6000/linux-unwind.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/libgcc/config/rs6000/linux-unwind.h b/libgcc/config/rs6000/linux-unwind.h
index 4788497..5ef9c1a 100644
--- a/libgcc/config/rs6000/linux-unwind.h
+++ b/libgcc/config/rs6000/linux-unwind.h
@@ -402,8 +402,14 @@ ppc_backchain_fallback (struct _Unwind_Context *context, void *a)
struct trace_arg *arg = a;
int count;
- /* Get the last address computed and start with the next. */
+ /* Get the last address computed. */
current = context->cfa;
+
+ /* If the trace CFA is not the context CFA the backtrace is done. */
+ if (arg == NULL || arg->cfa != current)
+ return;
+
+ /* Start with next address. */
current = current->backchain;
for (count = arg->count; current != NULL; current = current->backchain)