Commit 903db435 by Dave Korn Committed by Dave Korn

interpret.cc (DEBUG): Rename this ...

	* 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.

From-SVN: r146869
parent 33cbe421
2009-04-28 Dave Korn <dave.korn.cygwin@gmail.com> 2009-04-28 Dave Korn <dave.korn.cygwin@gmail.com>
* 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.
2009-04-28 Dave Korn <dave.korn.cygwin@gmail.com>
* java/lang/natVMClassLoader.cc * java/lang/natVMClassLoader.cc
(java::lang::VMClassLoader::defineClass): Fix assert. (java::lang::VMClassLoader::defineClass): Fix assert.
......
...@@ -5268,7 +5268,7 @@ if test "${enable_libgcj_debug+set}" = set; then ...@@ -5268,7 +5268,7 @@ if test "${enable_libgcj_debug+set}" = set; then
if test "$enable_libgcj_debug" = yes; then if test "$enable_libgcj_debug" = yes; then
cat >>confdefs.h <<\_ACEOF cat >>confdefs.h <<\_ACEOF
#define DEBUG 1 #define __GCJ_DEBUG 1
_ACEOF _ACEOF
LIBGCJDEBUG="enable" LIBGCJDEBUG="enable"
......
...@@ -244,7 +244,7 @@ AC_ARG_ENABLE(libgcj-debug, ...@@ -244,7 +244,7 @@ AC_ARG_ENABLE(libgcj-debug,
AS_HELP_STRING([--enable-libgcj-debug], AS_HELP_STRING([--enable-libgcj-debug],
[enable runtime debugging code]), [enable runtime debugging code]),
[if test "$enable_libgcj_debug" = yes; then [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" LIBGCJDEBUG="enable"
fi]) fi])
......
...@@ -25,7 +25,7 @@ gnu::classpath::Configuration::classpath_home() ...@@ -25,7 +25,7 @@ gnu::classpath::Configuration::classpath_home()
jboolean jboolean
gnu::classpath::Configuration::debug() gnu::classpath::Configuration::debug()
{ {
#ifdef DEBUG #ifdef __GCJ_DEBUG
return true; return true;
#else #else
return false; return false;
......
...@@ -3,9 +3,6 @@ ...@@ -3,9 +3,6 @@
/* Name of default AWT toolkit */ /* Name of default AWT toolkit */
#undef AWT_TOOLKIT #undef AWT_TOOLKIT
/* Define this if you want runtime debugging enabled. */
#undef DEBUG
/* Define if system properties shouldn't be read from /* Define if system properties shouldn't be read from
getenv("GCJ_PROPERTIES"). */ getenv("GCJ_PROPERTIES"). */
#undef DISABLE_GETENV_PROPERTIES #undef DISABLE_GETENV_PROPERTIES
...@@ -457,5 +454,8 @@ ...@@ -457,5 +454,8 @@
/* Required define if using POSIX threads */ /* Required define if using POSIX threads */
#undef _REENTRANT #undef _REENTRANT
/* Define this if you want runtime debugging enabled. */
#undef __GCJ_DEBUG
/* Define to `int' if <sys/types.h> does not define. */ /* Define to `int' if <sys/types.h> does not define. */
#undef ssize_t #undef ssize_t
...@@ -16,7 +16,7 @@ details. */ ...@@ -16,7 +16,7 @@ details. */
void _Jv_Abort (const char *, const char *, int, const char *) void _Jv_Abort (const char *, const char *, int, const char *)
__attribute__ ((__noreturn__)); __attribute__ ((__noreturn__));
#ifdef DEBUG #ifdef __GCJ_DEBUG
#define _Jv_AssertDoCall(Message) _Jv_Abort (__FUNCTION__, __FILE__, __LINE__, Message) #define _Jv_AssertDoCall(Message) _Jv_Abort (__FUNCTION__, __FILE__, __LINE__, Message)
#define JvAssertMessage(Expr, Message) \ #define JvAssertMessage(Expr, Message) \
...@@ -26,13 +26,13 @@ void _Jv_Abort (const char *, const char *, int, const char *) ...@@ -26,13 +26,13 @@ void _Jv_Abort (const char *, const char *, int, const char *)
#define JvFail(Message) _Jv_AssertDoCall (Message) #define JvFail(Message) _Jv_AssertDoCall (Message)
#else /* DEBUG */ #else /* __GCJ_DEBUG */
#define _Jv_AssertDoCall(Message) #define _Jv_AssertDoCall(Message)
#define JvAssertMessage(Expr, Message) #define JvAssertMessage(Expr, Message)
#define JvAssert(Expr) #define JvAssert(Expr)
#define JvFail(Message) _Jv_Abort (0, 0, 0, Message) #define JvFail(Message) _Jv_Abort (0, 0, 0, Message)
#endif /* not DEBUG */ #endif /* not __GCJ_DEBUG */
#endif /* __JAVA_ASSERT_H__ */ #endif /* __JAVA_ASSERT_H__ */
...@@ -23,7 +23,7 @@ details. */ ...@@ -23,7 +23,7 @@ details. */
// returns. // returns.
java::lang::Thread *thread = java::lang::Thread::currentThread(); java::lang::Thread *thread = java::lang::Thread::currentThread();
#ifdef DEBUG #ifdef __GCJ_DEBUG
_Jv_InterpFrame frame_desc (meth, thread, NULL, &pc); _Jv_InterpFrame frame_desc (meth, thread, NULL, &pc);
#else #else
_Jv_InterpFrame frame_desc (meth, thread); _Jv_InterpFrame frame_desc (meth, thread);
...@@ -38,7 +38,7 @@ details. */ ...@@ -38,7 +38,7 @@ details. */
_Jv_word locals[meth->max_locals]; _Jv_word locals[meth->max_locals];
#ifdef DEBUG #ifdef __GCJ_DEBUG
// This is the information needed to get and set local variables with // This is the information needed to get and set local variables with
// proper type checking. // proper type checking.
frame_desc.locals = locals; frame_desc.locals = locals;
...@@ -126,7 +126,7 @@ details. */ ...@@ -126,7 +126,7 @@ details. */
continue; continue;
} }
} }
#endif /* DEBUG */ #endif /* __GCJ_DEBUG */
#define INSN_LABEL(op) &&insn_##op #define INSN_LABEL(op) &&insn_##op
...@@ -347,7 +347,7 @@ details. */ ...@@ -347,7 +347,7 @@ details. */
#ifdef DIRECT_THREADED #ifdef DIRECT_THREADED
#ifdef DEBUG #ifdef __GCJ_DEBUG
#undef NEXT_INSN #undef NEXT_INSN
#define NEXT_INSN \ #define NEXT_INSN \
do \ do \
...@@ -392,7 +392,7 @@ details. */ ...@@ -392,7 +392,7 @@ details. */
#undef INTERP_REPORT_EXCEPTION #undef INTERP_REPORT_EXCEPTION
#define INTERP_REPORT_EXCEPTION(Jthrowable) REPORT_EXCEPTION (Jthrowable) #define INTERP_REPORT_EXCEPTION(Jthrowable) REPORT_EXCEPTION (Jthrowable)
#else // !DEBUG #else // !__GCJ_DEBUG
#undef NEXT_INSN #undef NEXT_INSN
#define NEXT_INSN goto *((pc++)->insn) #define NEXT_INSN goto *((pc++)->insn)
...@@ -416,7 +416,7 @@ details. */ ...@@ -416,7 +416,7 @@ details. */
#undef INTERP_REPORT_EXCEPTION #undef INTERP_REPORT_EXCEPTION
#define INTERP_REPORT_EXCEPTION(Jthrowable) /* not needed when not debugging */ #define INTERP_REPORT_EXCEPTION(Jthrowable) /* not needed when not debugging */
#endif // !DEBUG #endif // !__GCJ_DEBUG
#define INTVAL() ((pc++)->int_val) #define INTVAL() ((pc++)->int_val)
#define AVAL() ((pc++)->datum) #define AVAL() ((pc++)->datum)
...@@ -450,7 +450,7 @@ details. */ ...@@ -450,7 +450,7 @@ details. */
#else #else
#ifdef DEBUG #ifdef __GCJ_DEBUG
#define NEXT_INSN \ #define NEXT_INSN \
do \ do \
{ \ { \
...@@ -2677,7 +2677,7 @@ details. */ ...@@ -2677,7 +2677,7 @@ details. */
{ {
sp = stack; sp = stack;
sp++->o = ex; // Push exception. sp++->o = ex; // Push exception.
#ifdef DEBUG #ifdef __GCJ_DEBUG
if (JVMTI_REQUESTED_EVENT (ExceptionCatch)) if (JVMTI_REQUESTED_EVENT (ExceptionCatch))
{ {
using namespace gnu::gcj::jvmti; using namespace gnu::gcj::jvmti;
......
...@@ -983,7 +983,7 @@ void ...@@ -983,7 +983,7 @@ void
_Jv_InterpMethod::run (void *retp, INTERP_FFI_RAW_TYPE *args, _Jv_InterpMethod::run (void *retp, INTERP_FFI_RAW_TYPE *args,
_Jv_InterpMethod *meth) _Jv_InterpMethod *meth)
{ {
#undef DEBUG #undef __GCJ_DEBUG
#undef DEBUG_LOCALS_INSN #undef DEBUG_LOCALS_INSN
#define DEBUG_LOCALS_INSN(s, t) do {} while (0) #define DEBUG_LOCALS_INSN(s, t) do {} while (0)
...@@ -994,7 +994,7 @@ void ...@@ -994,7 +994,7 @@ void
_Jv_InterpMethod::run_debug (void *retp, INTERP_FFI_RAW_TYPE *args, _Jv_InterpMethod::run_debug (void *retp, INTERP_FFI_RAW_TYPE *args,
_Jv_InterpMethod *meth) _Jv_InterpMethod *meth)
{ {
#define DEBUG #define __GCJ_DEBUG
#undef DEBUG_LOCALS_INSN #undef DEBUG_LOCALS_INSN
#define DEBUG_LOCALS_INSN(s, t) \ #define DEBUG_LOCALS_INSN(s, t) \
do \ do \
...@@ -1719,7 +1719,7 @@ throw_class_format_error (const char *msg) ...@@ -1719,7 +1719,7 @@ throw_class_format_error (const char *msg)
CATCH_LOCATION with the method and location where the catch will CATCH_LOCATION with the method and location where the catch will
occur. If the exception is not caught, these are set to 0. 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 static void
find_catch_location (::java::lang::Throwable *exc, jthread thread, find_catch_location (::java::lang::Throwable *exc, jthread thread,
jmethodID *catch_method, jlong *catch_loc) jmethodID *catch_method, jlong *catch_loc)
...@@ -1751,7 +1751,7 @@ find_catch_location (::java::lang::Throwable *exc, jthread thread, ...@@ -1751,7 +1751,7 @@ find_catch_location (::java::lang::Throwable *exc, jthread thread,
caught (if it is caught). caught (if it is caught).
Like find_catch_location, this should only be called with the 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 interpreter proper, it is important to not call this function
without checking JVMTI_REQUESTED_EVENT(Exception) first. */ without checking JVMTI_REQUESTED_EVENT(Exception) first. */
void void
......
...@@ -26,7 +26,7 @@ details. */ ...@@ -26,7 +26,7 @@ details. */
#include <java/lang/reflect/Method.h> #include <java/lang/reflect/Method.h>
#include <java-stack.h> #include <java-stack.h>
#ifdef DEBUG #ifdef __GCJ_DEBUG
#include <java/lang/System.h> #include <java/lang/System.h>
#include <java/io/PrintStream.h> #include <java/io/PrintStream.h>
#endif #endif
......
...@@ -460,7 +460,7 @@ _Jv_makeUtf8Const (jstring string) ...@@ -460,7 +460,7 @@ _Jv_makeUtf8Const (jstring string)
#ifdef DEBUG #ifdef __GCJ_DEBUG
void void
_Jv_Abort (const char *function, const char *file, int line, _Jv_Abort (const char *function, const char *file, int line,
const char *message) const char *message)
...@@ -469,7 +469,7 @@ void ...@@ -469,7 +469,7 @@ void
_Jv_Abort (const char *, const char *, int, const char *message) _Jv_Abort (const char *, const char *, int, const char *message)
#endif #endif
{ {
#ifdef DEBUG #ifdef __GCJ_DEBUG
fprintf (stderr, fprintf (stderr,
"libgcj failure: %s\n in function %s, file %s, line %d\n", "libgcj failure: %s\n in function %s, file %s, line %d\n",
message, function, file, line); message, function, file, line);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment