From 996a93432aa09237d8d1509fd14bc3dfbc668f8f Mon Sep 17 00:00:00 2001 From: Ian Lepore Date: Mon, 25 Sep 2017 23:50:10 +0000 Subject: [PATCH] Fix the return value from _Unwind_Backtrace() on arm. If unwinding stops due to hitting the end of the call chain, the return value is supposed to be _URC_END_OF_STACK; other values indicate internal errors. The return value from get_eit_entry() is now returned without translating it to _URC_FAILURE, so that callers can see _URC_END_OF_STACK when it happens. --- contrib/gcc/config/arm/unwind-arm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/contrib/gcc/config/arm/unwind-arm.c b/contrib/gcc/config/arm/unwind-arm.c index 3ec7e561ca2f..7c668a3b0de0 100644 --- a/contrib/gcc/config/arm/unwind-arm.c +++ b/contrib/gcc/config/arm/unwind-arm.c @@ -773,11 +773,8 @@ __gnu_Unwind_Backtrace(_Unwind_Trace_Fn trace, void * trace_argument, do { /* Find the entry for this routine. */ - if (get_eit_entry (ucbp, saved_vrs.core.r[R_PC]) != _URC_OK) - { - code = _URC_FAILURE; + if ((code = get_eit_entry (ucbp, saved_vrs.core.r[R_PC])) != _URC_OK) break; - } /* The dwarf unwinder assumes the context structure holds things like the function and LSDA pointers. The ARM implementation