From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4779 invoked by alias); 19 Dec 2009 10:58:34 -0000 Received: (qmail 4639 invoked by uid 22791); 19 Dec 2009 10:58:33 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-fx0-f209.google.com (HELO mail-fx0-f209.google.com) (209.85.220.209) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 19 Dec 2009 10:58:28 +0000 Received: by fxm1 with SMTP id 1so3608353fxm.16 for ; Sat, 19 Dec 2009 02:58:26 -0800 (PST) MIME-Version: 1.0 Received: by 10.239.182.161 with SMTP id q33mr555192hbg.41.1261220305896; Sat, 19 Dec 2009 02:58:25 -0800 (PST) In-Reply-To: <4B2CB00D.5070405@redhat.com> References: <20091218144617.GA21353@bromo.med.uc.edu> <4B2B9934.7010205@redhat.com> <20091218204147.GA23604@bromo.med.uc.edu> <4B2CB00D.5070405@redhat.com> Date: Sat, 19 Dec 2009 10:58:00 -0000 Message-ID: <7230133d0912190258y5180f4feod4ccb95e2a8b54dc@mail.gmail.com> Subject: Re: _Unwind_FindEnclosingFunction vs darwin From: Bryce McKinlay To: Andrew Haley Cc: Jack Howarth , java@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2009-12/txt/msg00042.txt.bz2 On Sat, Dec 19, 2009 at 10:50 AM, Andrew Haley 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_FindEnclosingFu= nction(PC) > #endif > > to include/posix.h. > > Please make sure that darwin10_Unwind_FindEnclosingFunction is not export= ed from > anywhere. =A0I'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