Re: _Unwind_FindEnclosingFunction vs darwin
Bryce McKinlay <[email protected]>
| Newsgroups | gmane.comp.gcc.java.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Dec 19, 2009 at 10:50 AM, Andrew Haley <[email protected]> wrote: > It can either go in include/config.h if it's autoconf'd or perhaps in > one of the libgcj include files. > > The easiest thing would be to add > > #ifdef USING_DARWIN_CRT > #undefine _Unwind_FindEnclosingFunction(PC) > #define _Unwind_FindEnclosingFunction(PC) darwin10_Unwind_FindEnclosingFunction(PC) > #endif > > to include/posix.h. > > Please make sure that darwin10_Unwind_FindEnclosingFunction is not exported from > anywhere. I'd just declare it static inline in include/posix.h. Its better style not to make #defines that override function names. I'd suggest adding a (inline, since you wish to avoid exporting a function) _Jv_Unwind_FindEnclosingFunction() to posix.h and update all callers to use that. This function would either call through to libgcc's implementation, or contain its own implementation based on _Unwind_Find_FDE depending on a HAVE_UNWIND_FINDENCLOSINGFUNCTION autoconf define - this would be undefined on Darwin by checking the ${host} in configure.ac. On the other hand, if we can rely on _Unwind_Find_FDE being there, I wonder if there's any reason not to simply move FindEnclosingFunction into libgcj for all platforms? Bryce