http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49404
Summary: ARM _Unwind_Backtrace returns _URC_FAILURE too eagerly Product: gcc Version: 4.4.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: akos.paszt...@gmail.com Host: i686-pc-linux-gnu Target: arm-none-linux-gnueabi In the ARM implementation of _Unwind_Backtrace [1], if get_eit_entry() returns _URC_END_OF_STACK, as it will when reaching a .cantunwind function (e.g. _start), it is turned into _URC_FAILURE. Thus, _Unwind_Backtrace will (almost always?) return _URC_FAILURE, which is bad if someone relies on that return value. I wonder if the get_eit_entry() result should be just returned verbatim, if it's not _URC_OK, something like: if ((code = get_eit_entry (ucbp, saved_vrs.core.r[R_PC])) != _URC_OK) break; [1] http://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config/arm/unwind-arm.c;h=4a9e2325c39afca79d05148be46ff72663a8b5cd;hb=HEAD#l974