[backport proposed but not yet approved or applied patch for 4.8/trunk ] From: Meador Inge Subject: [PATCH] libgcc: Add DWARF info to aeabi_ldivmod and aeabi_uldivmod Date: Tue, 5 Mar 2013 12:15:04 -0600 List-Archive: Hi All, This patch fixes a minor annoyance that causes backtraces to disappear inside of aeabi_ldivmod and aeabi_uldivmod due to the lack of appropriate DWARF information. I fixed the problem by adding the necessary cfi_* macros in these functions. OK? 2013-03-05 Meador Inge * config/arm/bpabi.S (aeabi_ldivmod): Add DWARF information for computing the location of the link register. (aeabi_uldivmod): Ditto. --- gcc-4.8.0/libgcc/config/arm/bpabi.S.~1~ 2013-02-04 20:06:20.000000000 +0100 +++ gcc-4.8.0/libgcc/config/arm/bpabi.S 2013-03-23 17:57:01.223537119 +0100 @@ -123,6 +123,7 @@ ARM_FUNC_START aeabi_ulcmp #ifdef L_aeabi_ldivmod ARM_FUNC_START aeabi_ldivmod + cfi_start __aeabi_ldivmod, LSYM(Lend_aeabi_ldivmod) test_div_by_zero signed sub sp, sp, #8 @@ -132,17 +133,20 @@ ARM_FUNC_START aeabi_ldivmod #else do_push {sp, lr} #endif +98: cfi_push 98b - __aeabi_ldivmod, 0xe, -0xc, 0x10 bl SYM(__gnu_ldivmod_helper) __PLT__ ldr lr, [sp, #4] add sp, sp, #8 do_pop {r2, r3} RET + cfi_end LSYM(Lend_aeabi_ldivmod) #endif /* L_aeabi_ldivmod */ #ifdef L_aeabi_uldivmod ARM_FUNC_START aeabi_uldivmod + cfi_start __aeabi_uldivmod, LSYM(Lend_aeabi_uldivmod) test_div_by_zero unsigned sub sp, sp, #8 @@ -152,11 +156,13 @@ ARM_FUNC_START aeabi_uldivmod #else do_push {sp, lr} #endif +98: cfi_push 98b - __aeabi_uldivmod, 0xe, -0xc, 0x10 bl SYM(__gnu_uldivmod_helper) __PLT__ ldr lr, [sp, #4] add sp, sp, #8 do_pop {r2, r3} RET - + cfi_end LSYM(Lend_aeabi_uldivmod) + #endif /* L_aeabi_divmod */