Permalink
Browse files

Debugger: Register DEBUGBOX.COM after DOS COMMAND.COM init, not at em…

…ulator init. Command works again
  • Loading branch information...
joncampbell123 committed Feb 11, 2018
1 parent daf15bb commit 729880572362f4fa5d1d3f037692ffe797639c94
Showing with 8 additions and 2 deletions.
  1. +8 −2 src/debug/debug.cpp
@@ -2223,6 +2223,11 @@ void DEBUG_ShutDown(Section * /*sec*/) {
Bitu debugCallback;
void DEBUG_DOSStartUp(Section *x) {
/* setup debug.com */
PROGRAMS_MakeFile("DEBUGBOX.COM",DEBUG_ProgramStart);
}
void DEBUG_Init() {
LOG(LOG_MISC,LOG_DEBUG)("Initializing debug system");
@@ -2236,11 +2241,12 @@ void DEBUG_Init() {
#endif
/* Reset code overview and input line */
memset((void*)&codeViewData,0,sizeof(codeViewData));
/* setup debug.com */
PROGRAMS_MakeFile("DEBUGBOX.COM",DEBUG_ProgramStart);
/* Setup callback */
debugCallback=CALLBACK_Allocate();
CALLBACK_Setup(debugCallback,DEBUG_EnableDebugger,CB_RETF,"debugger");
AddVMEventFunction(VM_EVENT_DOS_INIT_SHELL_READY,AddVMEventFunctionFuncPair(DEBUG_DOSStartUp));
/* shutdown function */
AddExitFunction(AddExitFunctionFuncPair(DEBUG_ShutDown));
}

0 comments on commit 7298805

Please sign in to comment.