This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[patch] stacktrace.cc, another UNWRAP needed
- From: Andreas Tobler <toa at pop dot agri dot ch>
- To: Java Patches <java-patches at gcc dot gnu dot org>, Bryce McKinlay <mckinlay at redhat dot com>
- Cc: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Mon, 15 May 2006 21:59:10 +0200
- Subject: [patch] stacktrace.cc, another UNWRAP needed
Hello Bryce,
I think we need here an UNWRAP_FUNCTION_DESCRIPTOR too.
During the HP-UX work I debugged through here. If we do not unwrap, we
get tons of symbols instead of methods. (in the HP-UX case where the
UNWRAPER is not a simple one to one relation).
tested on sparc solaris, darwin-pcc and HP-UX (hppa2.0w-hp-hpux11.11)
Ok for main?
P.S, I added a temp variable only for readability.
Andreas
2006-05-15 Andreas Tobler <a.tobler@schweiz.ch>
* stacktrace.cc (StackTrace::FillInFrameInfo): Use
UNWRAP_FUNCTION_DESCRIPTOR to compare frame->start_ip against the
klass->methods[j].ncode.
Index: stacktrace.cc
===================================================================
--- stacktrace.cc (revision 113775)
+++ stacktrace.cc (working copy)
@@ -1,6 +1,6 @@
// stacktrace.cc - Functions for unwinding & inspecting the call stack.
-/* Copyright (C) 2005 Free Software Foundation
+/* Copyright (C) 2005, 2006 Free Software Foundation
This file is part of libgcj.
@@ -243,7 +243,8 @@
// Find method in class
for (int j = 0; j < klass->method_count; j++)
{
- if (klass->methods[j].ncode == frame->start_ip)
+ void *wncode UNWRAP_FUNCTION_DESCRIPTOR (klass->methods[j].ncode);
+ if (wncode == frame->start_ip)
{
meth = &klass->methods[j];
break;