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

Dmitry V. Levin ldv at altlinux.org
Thu Apr 12 21:06:43 UTC 2018


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,


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20180413/b89a5433/attachment.bin>


More information about the Strace-devel mailing list