This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: Use _Unwind_GetIPInfo in stacktrace.cc
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: mckinlay at redhat dot com (Bryce McKinlay)
- Cc: java-patches at gcc dot gnu dot org (Java Patches)
- Date: Thu, 6 Jul 2006 19:35:51 -0400 (EDT)
- Subject: Re: Patch: Use _Unwind_GetIPInfo in stacktrace.cc
>
> This is a multi-part message in MIME format.
> --------------000502000405060605090800
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding: 7bit
>
> The new _Unwind_GetIPInfo function allows us to determine if a frame's
> IP points to the instruction following a call instruction, or to a
> faulting instruction itself. In the case where it points to a following
> instruction, we need to "roll back" the IP used in line-number lookup so
> that the line number is that of the call itself, not the next line.
>
> Previously we would do this roll-back unconditionally, but this meant
> that exceptions generated by faults (eg NullPointerException) would
> sometimes show the wrong line number on their inner-most frame. Using
> _Unwind_GetIpInfo fixes this.
>
> I'm also checking in a test case which verifies that stack trace line
> numbers are correct (now that it finally passes!). I'm checking this in
> to trunk.
Can you also add a check in configure if _Unwind_GetIPInfo exists?
See PR 26792 for why you need this (there is even a patch against libstdc++
for this configure test).
-- Pinski