public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Haley <aph@redhat.com>
To: Jack Howarth <howarth@bromo.med.uc.edu>
Cc: java@gcc.gnu.org
Subject: Re: _Unwind_FindEnclosingFunction vs darwin
Date: Sat, 19 Dec 2009 17:26:00 -0000	[thread overview]
Message-ID: <4B2D0CB2.6080705@redhat.com> (raw)
In-Reply-To: <20091219134725.GA29636@bromo.med.uc.edu>

Jack Howarth wrote:
> On Sat, Dec 19, 2009 at 10:50:53AM +0000, Andrew Haley wrote:
>> Jack Howarth wrote:
>>> On Fri, Dec 18, 2009 at 03:01:08PM +0000, Andrew Haley wrote:
>>>> _Unwind_Find_FDE is a standard function.  Does Darwin support that?
>>>>
>>> Andrew,
>>>     I believe we do have _Unwind_Find_FDE on darwin10 but it
>>> is only functional if compact unwind information isn't used.
>>> This is currently the case in gcc trunk since I disabled
>>> the darwin10 linker's default of using compact unwind info
>>> to avoid issues with the new epilog unwind info on the
>>> darwin10 linker.
>>>      Shouldn't we be able to add something like...
>>>
>>>  void *
>>>  darwin10_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;
>>>  }
>>>
>>> and use...
>>>
>>> #undefine _Unwind_FindEnclosingFunction(PC) 
>>> #define _Unwind_FindEnclosingFunction(PC) darwin10_Unwind_FindEnclosingFunction(PC)
>>>
>>> to avoid the system _Unwind_FindEnclosingFunction() on darwin10?
>> Sure.
>>
>>> I assume that darwin10_Unwind_FindEnclosingFunction code would have to go into
>>> libjava/darwin.cc. However, I am unclear where to place...
>>>
>>> #undefine _Unwind_FindEnclosingFunction(PC) 
>>> #define _Unwind_FindEnclosingFunction(PC) darwin10_Unwind_FindEnclosingFunction(PC)
>> 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.
>>
>> Andrew.
> 
> Andrew,
>    The bigger question is were do we put the actual code for darwin10_Unwind_FindEnclosingFunction()
> such that libgcj can access it.

Define it static inline in libjava/include/posix.h..

Andrew.

  reply	other threads:[~2009-12-19 17:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-18 14:46 Jack Howarth
2009-12-18 15:01 ` Andrew Haley
2009-12-18 15:54   ` Jack Howarth
2009-12-18 20:41   ` Jack Howarth
2009-12-19 10:51     ` Andrew Haley
2009-12-19 10:58       ` Bryce McKinlay
2009-12-19 11:07         ` Andrew Haley
2009-12-19 13:47       ` Jack Howarth
2009-12-19 17:26         ` Andrew Haley [this message]
2009-12-19 18:49           ` Jack Howarth
2009-12-19 19:54             ` Bryce McKinlay
2009-12-20  0:30               ` Jack Howarth
2009-12-20  2:03               ` Jack Howarth
2009-12-20 12:14                 ` Bryce McKinlay
2009-12-20 13:20                   ` Andrew Haley
2009-12-20 13:25                 ` Andrew Haley
2009-12-20 16:03                   ` Jack Howarth
2009-12-20 16:12                   ` Jack Howarth
2009-12-20 17:47                     ` Andrew Haley
2009-12-19 19:57       ` Jack Howarth
2009-12-20 13:26         ` Andrew Haley
2009-12-19  0:22   ` Jack Howarth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B2D0CB2.6080705@redhat.com \
    --to=aph@redhat.com \
    --cc=howarth@bromo.med.uc.edu \
    --cc=java@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).