Here we go... Just adds the debug flag for test_prog.
-Melvin
--- orig/parrot/test_main.c Mon Oct 22 21:00:01 2001
+++ parrot/test_main.c Wed Dec 5 18:13:03 2001
@@ -20,6 +20,7 @@
int bounds_checking;
int profiling;
int tracing;
+ int debugging;
struct Parrot_Interp *interpreter;
init_world();
@@ -36,6 +37,7 @@
bounds_checking = 0;
profiling = 0;
tracing = 0;
+ debugging = 0;
while (argc > 1 && argv[1][0] == '-') {
if (argv[1][1] == 'b' && argv[1][2] == '\0') {
@@ -59,6 +61,13 @@
}
argc--;
}
+ else if (argv[1][1] == 'd' && argv[1][2] == '\0') {
+ debugging = 1;
+ for(i = 2; i < argc; i++) {
+ argv[i-1] = argv[i];
+ }
+ argc--;
+ }
}
/* If we got only the program name, complain */
@@ -105,6 +114,10 @@
return 1;
}
+ if (debugging) {
+ interpreter->flags |= PARROT_DEBUG_FLAG;
+ }
+
if (bounds_checking) {
interpreter->flags |= PARROT_BOUNDS_FLAG;
}