From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27719 invoked by alias); 18 Dec 2009 15:54:31 -0000 Received: (qmail 27709 invoked by uid 22791); 18 Dec 2009 15:54:30 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from bromo.med.uc.edu (HELO bromo.med.uc.edu) (129.137.3.146) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Fri, 18 Dec 2009 15:54:26 +0000 Received: from bromo.med.uc.edu (localhost.localdomain [127.0.0.1]) by bromo.med.uc.edu (Postfix) with ESMTP id C63B2400007; Fri, 18 Dec 2009 10:54:24 -0500 (EST) Received: (from howarth@localhost) by bromo.med.uc.edu (8.14.3/8.14.3/Submit) id nBIFsOFI021871; Fri, 18 Dec 2009 10:54:24 -0500 Date: Fri, 18 Dec 2009 15:54:00 -0000 From: Jack Howarth To: Andrew Haley Cc: java@gcc.gnu.org Subject: Re: _Unwind_FindEnclosingFunction vs darwin Message-ID: <20091218155424.GA21826@bromo.med.uc.edu> References: <20091218144617.GA21353@bromo.med.uc.edu> <4B2B9934.7010205@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B2B9934.7010205@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) 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/msg00038.txt.bz2 On Fri, Dec 18, 2009 at 03:01:08PM +0000, Andrew Haley wrote: > Jack Howarth wrote: > > > As I mentioned in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41991#c36, > > the darwin unwinder maintainer looked at the crash of gcj(ecj1) when compiling > > java code on darwin10. He claims that the origin of the problem is the use of > > the FSF unwinder extension _Unwind_FindEnclosingFunction which is not implemented > > in the system unwinder on darwin10. It appears that for darwin10 and later we > > will have to replace the call to _Unwind_FindEnclosingFunction on darwin with > > code using dladdr() to discover if the function is known to the dynamic loader > > That won't work. > > > ...assuming that the use of _Unwind_FindEnclosingFunction is to tell if the code > > address is static of dynamic(JIT) code. > > _Unwind_FindEnclosingFunction is trivial: > > void * > _Unwind_FindEnclosingFunction (void *pc) > { > struct dwarf_eh_bases bases; > const struct dwarf_fde *fde = _Unwind_Find_FDE (pc-1, &bases); > if (fde) > return bases.func; > else > return NULL; > } > > _Unwind_Find_FDE is a standard function. Does Darwin support that? > > Andrew. Andrew, I am waiting to here back from the Apple unwinder maintainer on that. Certainly _Unwind_Find_FDE exists for 10.4/10.5, however... http://www.opensource.apple.com/source/libgcc/libgcc-13/stub.c shows that it was moved out of libgcc for 10.6. I am unclear if it was moved into libSystem as a function or as not_implemented macro. Jack