[PATCH 2/2] unwind: add libdw as a alternative unwinder back-end
Masatake YAMATO
yamato at redhat.com
Fri Apr 13 00:06:06 UTC 2018
On Fri, 13 Apr 2018 00:06:43 +0300, "Dmitry V. Levin" <ldv at altlinux.org> wrote:
> On Wed, Apr 11, 2018 at 07:35:04PM +0200, Mark Wielaard wrote:
>> On Wed, 2018-04-11 at 20:24 +0300, Dmitry V. Levin wrote:
>> > Mark, besides this arm32 special case,
>> > what are the architectures where current elfutils libdw can unwind?
>> >
>> > My wild guess is:
>> > elfutils$ git grep '\<HOOK\>.*\<unwind\>'
>> > backends/aarch64_init.c: HOOK (eh, unwind);
>> > backends/i386_init.c: HOOK (eh, unwind);
>> > backends/ppc64_init.c: HOOK (eh, unwind);
>> > backends/s390_init.c: HOOK (eh, unwind);
>> > backends/x86_64_init.c: HOOK (eh, unwind);
>>
>> The 'unwind' hook is actually the arch specific fallback unwinder that
>> is used when the DWARF CFI method fails (usually frame pointer or link
>> register based).
>>
>> The DWARF CFI unwinder requires the backend to set the frame_nregs
>> field and add a abi_cfi hook.
>>
>> So git grep abi_cfi backends/*init.c
>>
>> backends/aarch64_init.c: HOOK (eh, abi_cfi);
>> backends/arm_init.c: HOOK (eh, abi_cfi);
>> backends/i386_init.c: HOOK (eh, abi_cfi);
>> backends/ppc64_init.c: HOOK (eh, abi_cfi);
>> backends/ppc_init.c: HOOK (eh, abi_cfi);
>> backends/s390_init.c: HOOK (eh, abi_cfi);
>> backends/sparc_init.c: HOOK (eh, abi_cfi);
>> backends/x86_64_init.c: HOOK (eh, abi_cfi);
>>
>> Note that s390 and sparc handle both the 31/32bit and 64bit variants.
>
> I did some testing, strace -k configured using --with-libdw
> passes stacktrace tests on these architectures.
>
> Looks like it's time to lift the "experimental" status from -k option.
>
> Thanks,
>
Mark and Dmitry, thank you!
It takes about 5 years to lift the status:)
commit 327064b63722a4400058e0e7e9b39d9e34b14b57
Author: Luca Clementi <luca.clementi at gmail.com>
Date: Tue Jul 23 00:11:35 2013 -0700
Add -k option to print stack trace after each syscall
Masatake YAMATO
> --
> ldv
More information about the Strace-devel
mailing list