diff --git a/include/QF/progs.h b/include/QF/progs.h index 841b586d3..a42ae8f1f 100644 --- a/include/QF/progs.h +++ b/include/QF/progs.h @@ -1695,6 +1695,7 @@ typedef enum { prd_trace, prd_breakpoint, prd_watchpoint, + prd_exit, // not sent by VM prd_runerror, prd_error, // lower level error thann prd_runerror } prdebug_t; diff --git a/ruamoko/qwaq/main.c b/ruamoko/qwaq/main.c index 87df0a035..46e1d8e4b 100644 --- a/ruamoko/qwaq/main.c +++ b/ruamoko/qwaq/main.c @@ -232,6 +232,9 @@ run_progs (void *data) PR_ExecuteProgram (thread->pr, thread->main_func); PR_PopFrame (thread->pr); + if (thread->pr->debug_handler) { + thread->pr->debug_handler (prd_exit, thread->pr->debug_data); + } thread->return_code = R_INT (thread->pr); return thread; }