From: Dave Korn <dave.korn.cygwin@googlemail.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Dave Korn <dave.korn.cygwin@googlemail.com>, java-patches@gcc.gnu.org
Subject: Re: [RFC] Fix PR38892: "--enable-libgcj-debug" breaks bootstrap.
Date: Thu, 23 Apr 2009 02:33:00 -0000 [thread overview]
Message-ID: <49EFD607.6020007@gmail.com> (raw)
In-Reply-To: <m3k55crxhg.fsf@fleche.redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1383 bytes --]
Tom Tromey wrote:
> A couple of the headers are installed, but this symbol isn't used by
> any of them. So, without the underscores is ok. It doesn't matter
> hugely to me, though, so if you already have the patch, the underscore
> variant is fine too.
Well, as it happens :)
libjava/ChangeLog
* interpret.cc (DEBUG): Rename this ...
(__GCJ_DEBUG): ... to this throughout.
* interpret-run.cc: Likewise.
* prims.cc: Likewise.
* configure.ac: Likewise.
* classpath/configure.ac: Likewise.
* classpath/native/jni/classpath/jcl.h: Likewise.
* classpath/native/jni/java-lang/java_lang_VMDouble.c: Likewise.
* classpath/native/jni/java-net/gnu_java_net_local_LocalSocketImpl.c:
Likewise.
* classpath/native/jni/java-math/gnu_java_math_GMP.c: Likewise.
* classpath/native/fdlibm/mprec.c: Likewise.
* classpath/native/fdlibm/mprec.h: Likewise.
* classpath/native/fdlibm/dtoa.c: Likewise.
* gnu/classpath/natConfiguration.cc: Likewise.
* include/java-assert.h: Likewise.
* java/io/natVMObjectInputStream.cc: Likewise.
* configure: Regenerate.
* classpath/configure: Regenerate.
* include/config.h.in: Regenerate.
* classpath/include/config.h.in: Regenerate.
Tested by seeing bootstrap run to completion on i686-pc-cygwin, and then
seeing lots of debug output from the run of gcj-dbtool to generate
classmap.db. Ok?
cheers,
DaveK
[-- Attachment #2: pr38892-part-2.diff --]
[-- Type: text/x-c, Size: 11095 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: 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: 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: 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: classpath/configure.ac
===================================================================
--- classpath/configure.ac (revision 146634)
+++ classpath/configure.ac (working copy)
@@ -877,7 +877,7 @@
[case "${enableval}" in
yes)
LIBDEBUG="true"
- AC_DEFINE(DEBUG, 1, [Define to 1 if you want native library runtime debugging code enabled])
+ AC_DEFINE(__GCJ_DEBUG, 1, [Define to 1 if you want native library runtime debugging code enabled])
;;
no) LIBDEBUG="false" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
Index: classpath/native/jni/classpath/jcl.h
===================================================================
--- classpath/native/jni/classpath/jcl.h (revision 146634)
+++ classpath/native/jni/classpath/jcl.h (working copy)
@@ -74,7 +74,7 @@
#define JCL_RETHROW_EXCEPTION(env) if((*(env))->ExceptionOccurred((env)) != NULL) return NULL;
/* Simple debug macro */
-#ifdef DEBUG
+#ifdef __GCJ_DEBUG
#define DBG(x) fprintf(stderr, "%s", (x));
#else
#define DBG(x)
Index: classpath/native/jni/java-lang/java_lang_VMDouble.c
===================================================================
--- classpath/native/jni/java-lang/java_lang_VMDouble.c (revision 146634)
+++ classpath/native/jni/java-lang/java_lang_VMDouble.c (working copy)
@@ -101,7 +101,7 @@
NEGATIVE_INFINITY = (*env)->GetStaticDoubleField (env, clsDouble, negInfID);
NaN = (*env)->GetStaticDoubleField (env, clsDouble, nanID);
-#ifdef DEBUG
+#ifdef __GCJ_DEBUG
fprintf (stderr, "java.lang.Double.initIDs() POSITIVE_INFINITY = %g\n",
POSITIVE_INFINITY);
fprintf (stderr, "java.lang.Double.initIDs() NEGATIVE_INFINITY = %g\n",
@@ -169,7 +169,7 @@
const char *p = buf, *end, *last_non_ws, *temp;
int ok = 1;
-#ifdef DEBUG
+#ifdef __GCJ_DEBUG
fprintf (stderr, "java.lang.VMDouble.parseDouble (%s)\n", buf);
#endif
@@ -224,7 +224,7 @@
val = _strtod_r (&reent, p, &endptr);
-#ifdef DEBUG
+#ifdef __GCJ_DEBUG
fprintf (stderr, "java.lang.VMDouble.parseDouble val = %g\n", val);
fprintf (stderr, "java.lang.VMDouble.parseDouble %p != %p ???\n",
endptr, last_non_ws);
Index: classpath/native/jni/java-net/gnu_java_net_local_LocalSocketImpl.c
===================================================================
--- classpath/native/jni/java-net/gnu_java_net_local_LocalSocketImpl.c (revision 146634)
+++ classpath/native/jni/java-net/gnu_java_net_local_LocalSocketImpl.c (working copy)
@@ -46,7 +46,7 @@
#include <stddef.h>
#include "local.h"
-#ifdef DEBUG
+#ifdef __GCJ_DEBUG
#define TRACE(msg) fprintf (stderr, "%s(%s:%d) -- %s\n", __FUNCTION__, __FILE__, __LINE__, msg)
#else
#define TRACE(msg)
Index: classpath/native/jni/java-math/gnu_java_math_GMP.c
===================================================================
--- classpath/native/jni/java-math/gnu_java_math_GMP.c (revision 146634)
+++ classpath/native/jni/java-math/gnu_java_math_GMP.c (working copy)
@@ -85,7 +85,7 @@
static jfieldID native_ptr;
-#ifdef DEBUG
+#ifdef __GCJ_DEBUG
#define TRACE(msg) fprintf (stderr, "%s(%s:%d) -- %s\n", __FUNCTION__, __FILE__, __LINE__, msg)
#else
#define TRACE(msg)
Index: classpath/native/fdlibm/mprec.c
===================================================================
--- classpath/native/fdlibm/mprec.c (revision 146634)
+++ classpath/native/fdlibm/mprec.c (working copy)
@@ -556,7 +556,7 @@
i = a->_wds;
j = b->_wds;
-#ifdef DEBUG
+#ifdef __GCJ_DEBUG
if (i > 1 && !a->_x[i - 1])
Bug ("cmp called with a->_x[a->_wds-1] == 0");
if (j > 1 && !b->_x[j - 1])
@@ -725,7 +725,7 @@
xa0 = a->_x;
xa = xa0 + a->_wds;
y = *--xa;
-#ifdef DEBUG
+#ifdef __GCJ_DEBUG
if (!y)
Bug ("zero y in b2d");
#endif
@@ -847,7 +847,7 @@
else
#endif
{
-#ifdef DEBUG
+#ifdef __GCJ_DEBUG
if (!z)
Bug ("Zero passed to d2b");
#endif
@@ -890,7 +890,7 @@
}
else
{
-#ifdef DEBUG
+#ifdef __GCJ_DEBUG
if (!z)
Bug ("Zero passed to d2b");
#endif
Index: classpath/native/fdlibm/mprec.h
===================================================================
--- classpath/native/fdlibm/mprec.h (revision 146634)
+++ classpath/native/fdlibm/mprec.h (working copy)
@@ -61,7 +61,7 @@
#define Just_16
#endif
-#ifdef DEBUG
+#ifdef __GCJ_DEBUG
#include "stdio.h"
#include <stdlib.h>
#define Bug(x) {fprintf(stderr, "%s\n", x); exit(1);}
Index: classpath/native/fdlibm/dtoa.c
===================================================================
--- classpath/native/fdlibm/dtoa.c (revision 146634)
+++ classpath/native/fdlibm/dtoa.c (working copy)
@@ -46,7 +46,7 @@
#endif
n = S->_wds;
-#ifdef DEBUG
+#ifdef __GCJ_DEBUG
/*debug*/ if (b->_wds > n)
/*debug*/ Bug ("oversize b in quorem");
#endif
@@ -57,7 +57,7 @@
bx = b->_x;
bxe = bx + n;
q = *bxe / (*sxe + 1); /* ensure q <= true quotient */
-#ifdef DEBUG
+#ifdef __GCJ_DEBUG
/*debug*/ if (q > 9)
/*debug*/ Bug ("oversized quotient in quorem");
#endif
@@ -140,7 +140,7 @@
return q;
}
-#ifdef DEBUG
+#ifdef __GCJ_DEBUG
#include <stdio.h>
void
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: 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: 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-23 2:33 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 [this message]
2009-04-26 0:18 ` Tom Tromey
2009-04-26 1:00 ` Dave Korn
2009-04-27 12:22 ` Dave Korn
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=49EFD607.6020007@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).