[PATCH 6/9] unwind: allow to specify unwinder back-end with -k option

Masatake YAMATO yamato at redhat.com
Tue Mar 20 18:17:31 UTC 2018


On Tue, 20 Mar 2018 20:55:53 +0300, "Dmitry V. Levin" <ldv at altlinux.org> wrote:
> On Wed, Mar 14, 2018 at 02:28:11AM +0900, Masatake YAMATO wrote:
>> With this commit, -k option can take an optional argument
>> specifying unwinder like:
>> 
>>   $ strace -klibunwind ...
>> 
>> Here, "libunwind" is the name of unwinder. Currently only libunwind
>> is available as unwinder. Using libdw as unwinder is planed.
>> 
>> If no unwinder is given, strace choose one of available unwinders
>> linked in the build time.
> 
> Given that libdw already performs better than libunwind as unwinder, why
> would one want to build a strace executable that supports both unwinders
> simultaneously?

I myself don't have much strong reason supporting both.

However, I guess there are not a few people who want
not to link GPL'ed library to strace. (I myself like GPL.)

If both unwinders are supported, we can know a bug by comparing
outputs. libdw looks better but having the way to compare the result
easily is not bad.

Splitting frontend (unwind.c) and backends (unwind-libdw.c and
unwind-libunwind.c) makes us improving the frontend easier because
unwind.c is so small than before.

Masakate YAMATO

> 
> -- 
> ldv


More information about the Strace-devel mailing list