From 2b31065e939262fe0846d5abc025487b6489c061 Mon Sep 17 00:00:00 2001 From: tomch Date: Sat, 12 Dec 2009 12:33:45 +0000 Subject: [PATCH] Debugger: Support old AppleWin GO cmd --- source/Debug.cpp | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/source/Debug.cpp b/source/Debug.cpp index bf1f196c..36c7dafc 100644 --- a/source/Debug.cpp +++ b/source/Debug.cpp @@ -7041,15 +7041,31 @@ Update_t ExecuteCommand (int nArgs) { WORD nAddress = 0; - // Support Apple Monitor commands - // ####G -> JMP $adress + // Support old AppleWin GO commands: + // . G -> GO + // . G #### -> GO until $address + // Support Apple Monitor commands: + // . ####G -> JMP $address (exit debugger) if ((pCommand[nLen-1] == 'G') || (pCommand[nLen-1] == 'g')) { - pCommand[nLen-1] = 0; - ArgsGetValue( pArg, & nAddress ); + if (nLen == 1) + { + if (nArgs) + { + const int iArg = 1; + ArgsGetValue( &g_aArgs[iArg], &g_aArgs[iArg].nValue ); + _CmdBreakpointAddCommonArg(iArg, nArgs, BP_SRC_REG_PC, BP_OP_EQUAL); // TC-TODO: Clear this temp BP when it's hit or stepping is cancelled + } + } + else if (nLen > 1) + { + pCommand[nLen-1] = 0; + ArgsGetValue( pArg, & nAddress ); + + regs.pc = nAddress; + } - regs.pc = nAddress; g_nAppMode = MODE_RUNNING; // exit the debugger nFound = 1;