From: Dave Korn <dave.korn.cygwin@googlemail.com>
To: Dave Korn <dave.korn.cygwin@googlemail.com>
Cc: Tom Tromey <tromey@redhat.com>, java-patches@gcc.gnu.org
Subject: Re: [RFC] Fix PR38892: "--enable-libgcj-debug" breaks bootstrap.
Date: Mon, 27 Apr 2009 12:22:00 -0000 [thread overview]
Message-ID: <49F5A60C.1010707@gmail.com> (raw)
In-Reply-To: <49F3B4B0.6010400@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2127 bytes --]
Dave Korn wrote:
> Tom Tromey wrote:
>>>>>>> "Dave" == Dave Korn <dave.korn.cygwin@googlemail.com> writes:
>> Dave> Well, as it happens :)
>> Dave> libjava/ChangeLog
>>
>> [...]
>>
>> Dave> * classpath/configure.ac: Likewise.
>> Dave> * classpath/native/jni/classpath/jcl.h: Likewise.
>> Dave> * classpath/native/jni/java-lang/java_lang_VMDouble.c: Likewise.
>>
>> I think you should not need any changes to Classpath.
>> Classpath code won't include the CNI headers, and so should not have
>> the problem. Is that not the case?
>>
>> Tom
>
> I didn't check, I just did a mechanical search and replace; I'll try
> reverting the classpath changes and check it's still ok.
How's this version? I reverted classpath/, but I left
gnu/classpath/natConfiguration.cc alone (it includes cni.h). I rebuilt the
previous $objdir rather than fully bootstrapped, but it all built fine and I
now get lots of nice debug output in my failing testruns showing me that there
are problems with the class loader, stuff like
spawn [open ...]
libgcj failure: klass->state == JV_STATE_LOADED
in function defineClass, file
/gnu/gcc/gcc/libjava/java/lang/natVMClassLoader.cc, line 99
FAIL: ExtraClassLoader execution - source compiled test
and
PASS: linking PR15133
set_ld_library_path_env_vars:
ld_library_path=.:/gnu/gcc/obj/i686-pc-cygwin/./libjava/.libs
spawn [open ...]
Exception in thread "main" java.lang.UnsatisfiedLinkError: libPR15133: No such
file or directory
at java.lang.Runtime._load(Unknown Source)
at java.lang.Runtime.loadLibrary(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at PR15133.main(Unknown Source)
FAIL: PR15133 run
UNTESTED: PR15133 output
So:
libjava/ChangeLog
* interpret.cc (DEBUG): Rename this ...
(__GCJ_DEBUG): ... to this throughout.
* configure.ac: Likewise.
* interpret-run.cc: Likewise.
* prims.cc: Likewise.
* gnu/classpath/natConfiguration.cc: Likewise.
* include/java-assert.h: Likewise.
* java/io/natVMObjectInputStream.cc: Likewise.
* configure: Regenerate.
* include/config.h.in: Regenerate.
Ok now?
cheers,
DaveK
[-- Attachment #2: pr38892-part-2-no-classpath.diff --]
[-- Type: text/x-c, Size: 5903 bytes --]
Index: interpret.cc
===================================================================
--- interpret.cc (revision 146634)
+++ interpret.cc (working copy)
@@ -983,7 +983,7 @@
_Jv_InterpMethod::run (void *retp, INTERP_FFI_RAW_TYPE *args,
_Jv_InterpMethod *meth)
{
-#undef DEBUG
+#undef __GCJ_DEBUG
#undef DEBUG_LOCALS_INSN
#define DEBUG_LOCALS_INSN(s, t) do {} while (0)
@@ -994,7 +994,7 @@
_Jv_InterpMethod::run_debug (void *retp, INTERP_FFI_RAW_TYPE *args,
_Jv_InterpMethod *meth)
{
-#define DEBUG
+#define __GCJ_DEBUG
#undef DEBUG_LOCALS_INSN
#define DEBUG_LOCALS_INSN(s, t) \
do \
@@ -1719,7 +1719,7 @@
CATCH_LOCATION with the method and location where the catch will
occur. If the exception is not caught, these are set to 0.
- This function should only be used with the DEBUG interpreter. */
+ This function should only be used with the __GCJ_DEBUG interpreter. */
static void
find_catch_location (::java::lang::Throwable *exc, jthread thread,
jmethodID *catch_method, jlong *catch_loc)
@@ -1751,7 +1751,7 @@
caught (if it is caught).
Like find_catch_location, this should only be called with the
- DEBUG interpreter. Since a few exceptions occur outside the
+ __GCJ_DEBUG interpreter. Since a few exceptions occur outside the
interpreter proper, it is important to not call this function
without checking JVMTI_REQUESTED_EVENT(Exception) first. */
void
Index: configure.ac
===================================================================
--- configure.ac (revision 146634)
+++ configure.ac (working copy)
@@ -244,7 +244,7 @@
AS_HELP_STRING([--enable-libgcj-debug],
[enable runtime debugging code]),
[if test "$enable_libgcj_debug" = yes; then
- AC_DEFINE(DEBUG, 1, [Define this if you want runtime debugging enabled.])
+ AC_DEFINE(__GCJ_DEBUG, 1, [Define this if you want runtime debugging enabled.])
LIBGCJDEBUG="enable"
fi])
Index: include/java-assert.h
===================================================================
--- include/java-assert.h (revision 146634)
+++ include/java-assert.h (working copy)
@@ -16,7 +16,7 @@
void _Jv_Abort (const char *, const char *, int, const char *)
__attribute__ ((__noreturn__));
-#ifdef DEBUG
+#ifdef __GCJ_DEBUG
#define _Jv_AssertDoCall(Message) _Jv_Abort (__FUNCTION__, __FILE__, __LINE__, Message)
#define JvAssertMessage(Expr, Message) \
@@ -26,13 +26,13 @@
#define JvFail(Message) _Jv_AssertDoCall (Message)
-#else /* DEBUG */
+#else /* __GCJ_DEBUG */
#define _Jv_AssertDoCall(Message)
#define JvAssertMessage(Expr, Message)
#define JvAssert(Expr)
#define JvFail(Message) _Jv_Abort (0, 0, 0, Message)
-#endif /* not DEBUG */
+#endif /* not __GCJ_DEBUG */
#endif /* __JAVA_ASSERT_H__ */
Index: prims.cc
===================================================================
--- prims.cc (revision 146634)
+++ prims.cc (working copy)
@@ -460,7 +460,7 @@
\f
-#ifdef DEBUG
+#ifdef __GCJ_DEBUG
void
_Jv_Abort (const char *function, const char *file, int line,
const char *message)
@@ -469,7 +469,7 @@
_Jv_Abort (const char *, const char *, int, const char *message)
#endif
{
-#ifdef DEBUG
+#ifdef __GCJ_DEBUG
fprintf (stderr,
"libgcj failure: %s\n in function %s, file %s, line %d\n",
message, function, file, line);
Index: gnu/classpath/natConfiguration.cc
===================================================================
--- gnu/classpath/natConfiguration.cc (revision 146634)
+++ gnu/classpath/natConfiguration.cc (working copy)
@@ -25,7 +25,7 @@
jboolean
gnu::classpath::Configuration::debug()
{
-#ifdef DEBUG
+#ifdef __GCJ_DEBUG
return true;
#else
return false;
Index: interpret-run.cc
===================================================================
--- interpret-run.cc (revision 146634)
+++ interpret-run.cc (working copy)
@@ -23,7 +23,7 @@
// returns.
java::lang::Thread *thread = java::lang::Thread::currentThread();
-#ifdef DEBUG
+#ifdef __GCJ_DEBUG
_Jv_InterpFrame frame_desc (meth, thread, NULL, &pc);
#else
_Jv_InterpFrame frame_desc (meth, thread);
@@ -38,7 +38,7 @@
_Jv_word locals[meth->max_locals];
-#ifdef DEBUG
+#ifdef __GCJ_DEBUG
// This is the information needed to get and set local variables with
// proper type checking.
frame_desc.locals = locals;
@@ -126,7 +126,7 @@
continue;
}
}
-#endif /* DEBUG */
+#endif /* __GCJ_DEBUG */
#define INSN_LABEL(op) &&insn_##op
@@ -347,7 +347,7 @@
#ifdef DIRECT_THREADED
-#ifdef DEBUG
+#ifdef __GCJ_DEBUG
#undef NEXT_INSN
#define NEXT_INSN \
do \
@@ -392,7 +392,7 @@
#undef INTERP_REPORT_EXCEPTION
#define INTERP_REPORT_EXCEPTION(Jthrowable) REPORT_EXCEPTION (Jthrowable)
-#else // !DEBUG
+#else // !__GCJ_DEBUG
#undef NEXT_INSN
#define NEXT_INSN goto *((pc++)->insn)
@@ -416,7 +416,7 @@
#undef INTERP_REPORT_EXCEPTION
#define INTERP_REPORT_EXCEPTION(Jthrowable) /* not needed when not debugging */
-#endif // !DEBUG
+#endif // !__GCJ_DEBUG
#define INTVAL() ((pc++)->int_val)
#define AVAL() ((pc++)->datum)
@@ -450,7 +450,7 @@
#else
-#ifdef DEBUG
+#ifdef __GCJ_DEBUG
#define NEXT_INSN \
do \
{ \
@@ -2677,7 +2677,7 @@
{
sp = stack;
sp++->o = ex; // Push exception.
-#ifdef DEBUG
+#ifdef __GCJ_DEBUG
if (JVMTI_REQUESTED_EVENT (ExceptionCatch))
{
using namespace gnu::gcj::jvmti;
Index: java/io/natVMObjectInputStream.cc
===================================================================
--- java/io/natVMObjectInputStream.cc (revision 146634)
+++ java/io/natVMObjectInputStream.cc (working copy)
@@ -26,7 +26,7 @@
#include <java/lang/reflect/Method.h>
#include <java-stack.h>
-#ifdef DEBUG
+#ifdef __GCJ_DEBUG
#include <java/lang/System.h>
#include <java/io/PrintStream.h>
#endif
next prev parent reply other threads:[~2009-04-27 12:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-22 19:14 Dave Korn
2009-04-22 22:51 ` Tom Tromey
2009-04-22 22:53 ` Dave Korn
2009-04-22 23:02 ` Dave Korn
2009-04-23 1:05 ` Tom Tromey
2009-04-23 2:33 ` Dave Korn
2009-04-26 0:18 ` Tom Tromey
2009-04-26 1:00 ` Dave Korn
2009-04-27 12:22 ` Dave Korn [this message]
2009-04-27 22:12 ` Tom Tromey
2009-04-28 4:04 ` Dave Korn
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=49F5A60C.1010707@gmail.com \
--to=dave.korn.cygwin@googlemail.com \
--cc=java-patches@gcc.gnu.org \
--cc=tromey@redhat.com \
/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).