This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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: Use _Unwind_GetIPInfo in stacktrace.cc


Andrew Pinski wrote:
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).

Yes, if libstdc++ introduces a configure test, then I'll use it in libjava too. Hopefully it can be put in the common aclocal.m4?


Bryce


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