##
## Changes: Edwin Steiner
##
-## $Id: Makefile.am 5234 2006-08-14 17:50:12Z christian $
+## $Id: Makefile.am 5253 2006-08-18 18:37:19Z tbfg $
## Process this file with automake to produce Makefile.in
stack.c \
stack.h \
stacktrace.c \
- stacktrace.h
+ stacktrace.h \
+ ../options.h
libjit_la_SOURCES += \
cfg.c \
Joseph Wenninger
Edwin Steiner
- $Id: dseg.c 5186 2006-07-28 13:24:43Z twisti $
+ $Id: dseg.c 5253 2006-08-18 18:37:19Z tbfg $
*/
#include <assert.h>
+#include "vm/options.h"
#include "vm/types.h"
#include "mm/memory.h"
#include "vm/jit/codegen-common.h"
+
/* dseg_finish *****************************************************************
Fills the data segment with the values stored.
s4ptr = (s4 *) (ptrint) code->mcode;
+ if (opt_colorverbose) printf("\033[34m"); /* blue */
printf(" --- dump of datasegment\n");
for (i = cd->dseglen; i > 0 ; i -= 4) {
}
printf(" --- begin of data segment: %p\n", (void *) s4ptr);
+ if (opt_colorverbose) printf("\033[m");
}
#endif /* !defined(NDEBUG) */
Edwin Steiner
Christian Thalinger
- $Id: method.c 5038 2006-06-19 22:22:34Z twisti $
+ $Id: method.c 5253 2006-08-18 18:37:19Z tbfg $
*/
#include "vm/linker.h"
#include "vm/loader.h"
#include "vm/method.h"
+#include "vm/options.h"
#include "vm/jit/methodheader.h"
#if !defined(NDEBUG)
void method_println(methodinfo *m)
{
+ if (opt_colorverbose) printf("\033[31m"); /* red */
method_print(m);
+ if (opt_colorverbose) printf("\033[m");
printf("\n");
}
#endif /* !defined(NDEBUG) */
Changes:
- $Id: options.c 5234 2006-08-14 17:50:12Z christian $
+ $Id: options.c 5253 2006-08-18 18:37:19Z tbfg $
*/
s4 opt_stacksize = 0; /* thread stack size */
bool opt_verbose = false;
+bool opt_colorverbose = false; /* use ANSI terminal sequences */
bool compileall = false;
bool loadverbose = false;
} else {
/* parameter and option have no space between */
+ /* FIXME: this assumption is plain wrong, hits you if there is a
+ * parameter with no argument starting with same letter as param with argument
+ * but named after that one, ouch! */
+
size_t l = strlen(opts[i].name);
if (strlen(option + 1) > l) {
Changes:
- $Id: options.h 5234 2006-08-14 17:50:12Z christian $
+ $Id: options.h 5253 2006-08-18 18:37:19Z tbfg $
*/
extern s4 opt_stacksize;
extern bool opt_verbose;
+extern bool opt_colorverbose;
extern bool compileall;
extern bool loadverbose; /* Print debug messages during loading */
OPT_METHOD,
OPT_SIGNATURE,
OPT_SHOW,
+ OPT_COLORVERBOSE,
OPT_ALL,
#if defined(ENABLE_VERIFIER)
#endif
{ "m", true, OPT_METHOD },
{ "s", true, OPT_SHOW },
+ { "verbosecolor", false, OPT_COLORVERBOSE },
{ NULL, false, 0 }
};
puts(" -v write state-information");
puts(" -verbose[:call|exception|jit]");
puts(" enable specific verbose output");
+ puts(" -verbosecolor colored output for ANSI terms");
#ifdef TYPECHECK_VERBOSE
puts(" -verbosetc write debug messages while typechecking");
#endif
else if (strcmp("exception", opt_arg) == 0)
opt_verboseexception = true;
break;
+ case OPT_COLORVERBOSE:
+ opt_colorverbose = true;
+ break;
#if defined(ENABLE_VERIFIER) && defined(TYPECHECK_VERBOSE)
case OPT_VERBOSETC: