[kaffe] CVS kaffe (robilad): Cross-compilation fix for libkaffevm
Kaffe CVS
cvs-commits at kaffe.org
Sun Mar 13 12:01:08 PST 2005
PatchSet 5551
Date: 2005/03/13 19:56:32
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Cross-compilation fix for libkaffevm
2005-03-13 Dalibor Topic <robilad at kaffe.org>
* kaffe/kaffevm/debug.c
(kaffevmDebugMask) Made static.
(dbgGetMask) New function.
(dbgSetMask) Added comments.
* kaffe/kaffevm/debug.h
(kaffevmDebugMask): Removed prototype.
(DBG, DBGEXPR) Use dbgGetMask instead of kaffevmDebugMask.
Members:
ChangeLog:1.3725->1.3726
kaffe/kaffevm/debug.c:1.61->1.62
kaffe/kaffevm/debug.h:1.40->1.41
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3725 kaffe/ChangeLog:1.3726
--- kaffe/ChangeLog:1.3725 Sun Mar 13 18:14:26 2005
+++ kaffe/ChangeLog Sun Mar 13 19:56:32 2005
@@ -1,5 +1,16 @@
2005-03-13 Dalibor Topic <robilad at kaffe.org>
+ * kaffe/kaffevm/debug.c
+ (kaffevmDebugMask) Made static.
+ (dbgGetMask) New function.
+ (dbgSetMask) Added comments.
+
+ * kaffe/kaffevm/debug.h
+ (kaffevmDebugMask): Removed prototype.
+ (DBG, DBGEXPR) Use dbgGetMask instead of kaffevmDebugMask.
+
+2005-03-13 Dalibor Topic <robilad at kaffe.org>
+
* kaffe/kaffevm/baseClasses.h
(getStringClass): New function.
(ClassClass) Made static.
Index: kaffe/kaffe/kaffevm/debug.c
diff -u kaffe/kaffe/kaffevm/debug.c:1.61 kaffe/kaffe/kaffevm/debug.c:1.62
--- kaffe/kaffe/kaffevm/debug.c:1.61 Sun Jan 30 18:21:38 2005
+++ kaffe/kaffe/kaffevm/debug.c Sun Mar 13 19:56:34 2005
@@ -62,8 +62,31 @@
#else /* Actually define the functions */
/* --- Debugging is enabled --- */
-debugmask_t kaffevmDebugMask = DEFAULT_DEBUG_MASK;
+/* Defines what debugging output is seen. Needs to be 64-bit. */
+static debugmask_t kaffevmDebugMask = DEFAULT_DEBUG_MASK;
+/**
+ * Get the debug mask.
+ *
+ * The debug mask defines what kind of
+ * debugging output is enabled or disabled.
+ *
+ * @return current debug mask
+ */
+debugmask_t
+dbgGetMask(void)
+{
+ return kaffevmDebugMask;
+}
+
+/**
+ * Set the debug mask.
+ *
+ * The debug mask defines what kind of
+ * debugging output is enabled or disabled.
+ *
+ * @param mask new debug mask
+ */
void
dbgSetMask(debugmask_t mask)
{
Index: kaffe/kaffe/kaffevm/debug.h
diff -u kaffe/kaffe/kaffevm/debug.h:1.40 kaffe/kaffe/kaffevm/debug.h:1.41
--- kaffe/kaffe/kaffevm/debug.h:1.40 Sun Jan 30 18:21:38 2005
+++ kaffe/kaffe/kaffevm/debug.h Sun Mar 13 19:56:34 2005
@@ -177,21 +177,20 @@
#else
/* --- Debugging is enabled --- */
-/* Defines what debugging output is seen. Needs to be 64-bit. */
-extern debugmask_t kaffevmDebugMask;
+extern debugmask_t dbgGetMask(void);
# define DBGIF(statement) do { statement; } while (0)
/* Debug macros that are selected with the above flags. */
# define DBG(mask, statement) do { \
- if ((DBG_##mask)&(kaffevmDebugMask)) { \
+ if ((DBG_##mask)&(dbgGetMask())) { \
statement; \
} \
} while (0)
# define DBGEXPR(mask, expr, default) \
- (((DBG_##mask)&(kaffevmDebugMask))?(expr):(default))
+ (((DBG_##mask)&(dbgGetMask()))?(expr):(default))
/* Do something that would cause GDB to gain control. */
# define DBGGDBBREAK() do { (*(int*)0) = 42; } while (0)
More information about the kaffe
mailing list