--- previous/src/debug/debugui.c 2018/04/24 19:25:54 1.1.1.2 +++ previous/src/debug/debugui.c 2018/04/24 19:32:11 1.1.1.3 @@ -27,7 +27,6 @@ const char DebugUI_fileid[] = "Hatari de #include "file.h" #include "log.h" #include "m68000.h" -#include "memorySnapShot.h" #include "options.h" #include "screen.h" #include "statusbar.h" @@ -43,7 +42,7 @@ const char DebugUI_fileid[] = "Hatari de int bExceptionDebugging; -FILE *debugOutput; +FILE *debugOutput = NULL; static dbgcommand_t *debugCommand; static int debugCommands; @@ -273,28 +272,6 @@ static char *DebugUI_EvaluateExpressions return input; } - -/** - * Command: Store and restore emulation state - */ -static int DebugUI_DoMemorySnap(int argc, char *argv[]) -{ - const char *file; - - if (argc > 1) - file = argv[1]; - else - file = ConfigureParams.Memory.szMemoryCaptureFileName; - - if (strcmp(argv[0], "stateload") == 0) - MemorySnapShot_Restore(file, true); - else - MemorySnapShot_Capture(file, true); - - return DEBUGGER_CMDDONE; -} - - /** * Command: Set command line and debugger options */ @@ -811,25 +788,13 @@ static const dbgcommand_t uicommand[] = "\t'bin', 'dec' and 'hex' arguments change the default number base\n" "\tused in debugger.", false }, - { DebugUI_DoMemorySnap, NULL, - "stateload", "", - "restore emulation state", - "[filename]\n" - "\tRestore emulation snapshot from default or given file", - false }, - { DebugUI_DoMemorySnap, NULL, - "statesave", "", - "save emulation state", - "[filename]\n" - "\tSave emulation snapshot to default or given file", - false }, { DebugUI_SetTracing, Log_MatchTrace, "trace", "t", "select Hatari tracing settings", "[set1,set2...]\n" "\tSelect Hatari tracing settings. 'help' shows all the available\n" "\tsettings. For example, to enable CPU disassembly and VBL\n" - "\ttracing, use:\n\t\ttrace cpu_disasm,video_hbl", + "\ttracing, use:\n\t\ttrace cpu_disasm", false }, { DebugUI_QuitEmu, NULL, "quit", "q", @@ -845,9 +810,12 @@ static const dbgcommand_t uicommand[] = */ void DebugUI_Init(void) { - const dbgcommand_t *cpucmd, *dspcmd; - int cpucmds, dspcmds; + const dbgcommand_t *cpucmd; + int cpucmds; + if(!(debugOutput)) + debugOutput = stderr; + /* already intialized? */ if (debugCommands) return; @@ -887,7 +855,7 @@ bool DebugUI_SetParseFile(const char *pa parseFileName = path; return true; } - fprintf(stderr, "ERROR: debugger input file '%s' missing.\n", path); + //fprintf(stderr, "ERROR: debugger input file '%s' missing.\n", path); return false; } @@ -920,7 +888,7 @@ void DebugUI(void) /* override paused message so that user knows to look into console * on how to continue in case he invoked the debugger by accident. */ - Statusbar_AddMessage("Console Debugger", 100); + Statusbar_AddMessage("M68K Console Debugger", 100); Statusbar_Update(sdlscrn); /* disable normal GUI alerts while on console */