Re: [PATCH 1/2] Use -fno-asynchronous-unwind-tables if C program is compiled without debug info on x86

Yao Qi
2016-04-22T16:05:58Z

Pedro Alves <palves@redhat.com> writes:

> Instead of a name, maybe a frame-unwinder-class enum, based on
> https://sourceware.org/bugzilla/show_bug.cgi?id=19288#c13
>
> ~~~~~~~~~~~~~~~
> - The "Accurate unwinders"
>
> These would be the DWARF / x64 SEH based ones.
>
> - JIT unwinders
>
> Python/Guile unwind API unwinders, and also the C JIT-reader
> API unwinder, in jit.c.
>
> - Fallback prologue unwinders
> ~~~~~~~~~~~~~~~
>
> Then it could be "required" instead of "preferred", which would
> catch problems with the unwinder's sniffer as well.

I am fine on this, but I don't think this is helpful to PR 19288.

What we need in PR 19288 is a dynamic list of unwinders (based on
priority), so that user can change the orders of unwinders in the list
by changing their priorities. IIUC, in PR 19288, each unwinder works
well if the desired unwinder in the chain is selected. The problem is
the desired unwinder can't be selected in the chain.

If we want to handle these two problems together, we need command line
interface to set and change the priorities of unwinders or classes of
unwinders. This would be useful to PR 19288. We can set priority to -1
or 0 to disable the unwinder completely.

However, my concern on this feature is that we may expose too much to
the user, and usually, it is tricky and sensitive on changing the order of
unwinders.

--
Yao (齐尧)