Author: julianalbo
Date: Thu Aug 21 15:45:30 2008
New Revision: 30432
Modified:
trunk/src/parrot_debugger.c
trunk/src/runops_cores.c
Log:
avoid exiting parrot_debugger at program end
Modified: trunk/src/parrot_debugger.c
==============================================================================
--- trunk/src/parrot_debugger.c (original)
+++ trunk/src/parrot_debugger.c Thu Aug 21 15:45:30 2008
@@ -254,7 +254,11 @@
return;
}
- Parrot_runcode(interp, argc, argv);
+ /* Loop to avoid exiting at program end */
+ do {
+ Parrot_runcode(interp, argc, argv);
+ interp->pdb->state |= PDB_STOPPED;
+ } while (! (interp->pdb->state & PDB_EXIT));
free_runloop_jump_point(interp);
}
Modified: trunk/src/runops_cores.c
==============================================================================
--- trunk/src/runops_cores.c (original)
+++ trunk/src/runops_cores.c Thu Aug 21 15:45:30 2008
@@ -352,9 +352,16 @@
DO_OP(pc, interp);
interp->pdb->cur_opcode = pc;
- if (interp->pdb->tracing) {
- if (--interp->pdb->tracing == 0) {
- Parrot_debugger_start(interp, pc);
+
+ if (interp->pdb->state & PDB_STOPPED) {
+ Parrot_debugger_start(interp, pc);
+ }
+ else
+ {
+ if (interp->pdb->tracing) {
+ if (--interp->pdb->tracing == 0) {
+ Parrot_debugger_start(interp, pc);
+ }
}
}
}