This is the mail archive of the mailing list for the libstdc++ 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: IA64 HP-UX Unwind patch

On Wed, Aug 14, 2002 at 10:45:00AM -0700, Steve Ellcey wrote:
> The first is what _URC_ code does _Unwind_DeleteException call the
> cleanup routine with.  HP uses _URC_NO_REASON and GCC uses
> _URC_FOREIGN_EXCEPTION_CAUGHT.  My fix for this was to create
> _URC_EXPECTED_BY_CLEANUP in unwind.h and define it to
> _URC_FOREIGN_EXCEPTION_CAUGHT if it was not already defined and then use
> that in __gxx_exception_cleanup (libstdc++-v3/libsupc++/
> Then I put my own definition of _URC_EXPECTED_BY_CLEANUP in
> libstdc++-v3/config/os/hpux/os_defines.h for HP-UX.

This, IMO, is a bug in the HPUX library.  Section 1.4

  "If a given runtime resumes normal execution after catching a
   foreign exception..."

Anyway, it's not worth adding macros for this.  Instead, modify
the two places to expect *both* _URC_FOREIGN_EXCEPTION_CAUGHT
and _URC_NO_REASON, with a comment about the different behaviour
of the hpux library.

> The second problem is with _Unwind_SetIP.  Even in ILP32 mode, the HP-UX
> Unwind library expects you to pass in a 64 bit pointer on IA64.  So, I
> created a macro in os_defines.h called UNWIND_SETIP to use instead of
> calling _Unwind_SetIP if it is defined.  I also ifdef'ed the
> _Unwind_SetIP declaration in unwind.h so I could have my own version in
> os_defines.h with different arg types.

Good lord.

How does the function call ABI work?  If we changed the prototype
to a void* would it work?  I really dislike this part of the patch.

> + extern void _Unwind_SetIP (struct _Unwind_Context *, unsigned __attribute__((__mode__(__word__))));

In any case, this is _Unwind_Word.


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