[RFC/CFT] Hookize TARGET_UNWIND_INFO and related macros

Thomas Schwinge thomas@codesourcery.com
Thu Sep 23 17:28:00 GMT 2010


Hello!

Redirected to this thread / proposal from
<http://gcc.gnu.org/ml/gcc-patches/2010-09/msg01572.html>.

On 2010-09-08 20:18, Richard Henderson wrote:
> Currently we have TARGET_UNWIND_INFO, DWARF2_UNWIND_INFO,
> DWARF2_FRAME_INFO, and MUST_USE_SJLJ_EXCEPTIONS, all of
> which interact in... let's call it surprising ways.

Indeed...

> The following adds hooks that could replace all 4 macros
> with 2 target hooks.

Yes, from a first reading of the patch it does seem like a sensible
approach.  Unfortunately, the amount of time I'm able to dedicate to
toolchain issues is very limited at the moment, but I'll try to do some
testing for ARM in the following weeks, if your proposed patch is
generally considered the way to go.

In case you want to check your new infrastructure against it, here are my
notes from 2010-03-31 when I analyzed this matter; the patch that meant
to achieve this is the one I quoted in
<http://gcc.gnu.org/ml/gcc-patches/2010-09/msg01551.html>.


* goal

desired output from gcc/dwarf2out.c:

** TARGET_UNWIND_INFO

!NEED_UNWIND_TABLES -> no output at all
NEED_UNWIND_TABLES -> no output at all
-g !NEED_UNWIND_TABLES -> .cfi_sections .debug_frame; CFI ASM instr.
-g NEED_UNWIND_TABLES -> .cfi_sections .debug_frame; CFI ASM instr.

** !TARGET_UNWIND_INFO

!NEED_UNWIND_TABLES -> no output at all
NEED_UNWIND_TABLES -> no .cfi_sections (will go to .eh_frame by default); CFI ASM instr.
-g !NEED_UNWIND_TABLES -> .cfi_sections .debug_frame; CFI ASM instr.
-g NEED_UNWIND_TABLES -> no .cfi_sections; CFI ASM instr. -- but what about .debug_frame?


Regards,
 Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100923/67127f43/attachment.sig>


More information about the Gcc-patches mailing list