[PATCH 2/2] unwind: add libdw as a alternative unwinder back-end

Mark Wielaard mark at klomp.org
Wed Apr 11 17:35:04 UTC 2018


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.

Cheers,

Mark


More information about the Strace-devel mailing list