This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [PATCH] Offset ip value in MD_FALLBACK_FRAME_STATE_FOR on x86-linux


Olivier Hainque writes:
 > 
 > [Thanks for your prompt feedback :)]
 > 
 > Andrew Haley wrote:
 > > This is potentially problematic for Java, in that we already do this
 > > adjustment in the signal handler.
 > 
 >  Didn't know, thanks for the update. Does it work the same way for
 >  C++ ?

C++ doesn't support throwing exceptions from signal handlers.

 > > I'm surprised that Ada doesn't do the same thing.
 > 
 >  I thought those adjustments could be considered as a property of
 >  the underlying unwinding/propagation support, and should not be
 >  propulated to it's "clients".
 > 
 >  It means every language/library relies on a very precise knowledge
 >  of the underlying implementation, so has to take care and be
 >  adjusted if the support changes for whatever reason.
 > 
 >  Is that correct ?

Yes.

 >  As of today, the GNAT signal handler just calls a somewhat
 >  high-level routine to "raise" an exception, whatever the
 >  underlying cicuitry is. There are indeed different possible ones
 >  and I'm not sure all would be happy with an IP adjustment, but we
 >  could certainly conditionalize. Will give it a try.

The details are subtle.  Look at the Java signal handlers in
libjava/include.

I'm not saying that the Java method is better than what you propose.
However, if you're going to change the way this works, you have to
look at how this will affect all targets, not just i386.

Andrew.


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