This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with x64 SEH macro implementation for ReactOS


Timo Kreuzer wrote: 
>I am working on x64 SEH for ReactOS. The idea is to use .cfi_escape
>codes to mark the code positions where the try block starts / ends and
>of the except landing pad. The emitted .eh_frame section is parsed after
>linking and converted into Windows compatible unwind info / scope tables.
>This works quite well so far.

Richard Henderson writes:
>I always imagined that if someone wanted to do SEH, they'd actually
>implement it within GCC, rather than post-processing it like this.
>Surely you're making things too hard for yourself with these escape hacks

I assume he's trying to create the equivilent of the existing macro's for
handling Windows structured exceptions in 32-bit code.  The 32-bit macros
don't require any post-processing and are fairly simple.  Still even
with the post-processing, Timo Kreuzer's solution would be heck of a
lot easier to implement then adding SEH support to GCC.

The big problem is that the last time I checked GCC wasn't generating the
Windows x64 ABI required prologue, epilogues or unwind info for functions.
Windows won't be able to unwind through GCC compiled functions whether
the macros are used or not.

I think the solution to the specific problem he mentioned, connecting
nested functions to their try blocks, would be to emit address pairs to
a special section.

					Ross Ridge


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]