From a735f2be18b9912b6090d2363639d8c4a3c39cbe Mon Sep 17 00:00:00 2001 From: mpohoreski Date: Sun, 20 Feb 2011 23:29:30 +0000 Subject: [PATCH] 2.7.0.17 Fixed: HELP wasn't displaying when category was one of: FLAGS, OUTPUT, WATCHES --- AppleWin/source/Debugger/Debug.cpp | 9 +- .../source/Debugger/Debugger_Commands.cpp | 8 +- AppleWin/source/Debugger/Debugger_Help.cpp | 91 +++++++------------ 3 files changed, 44 insertions(+), 64 deletions(-) diff --git a/AppleWin/source/Debugger/Debug.cpp b/AppleWin/source/Debugger/Debug.cpp index 23a27008..062021ca 100644 --- a/AppleWin/source/Debugger/Debug.cpp +++ b/AppleWin/source/Debugger/Debug.cpp @@ -36,7 +36,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #define ALLOW_INPUT_LOWERCASE 1 // See /docs/Debugger_Changelog.txt for full details - const int DEBUGGER_VERSION = MAKE_VERSION(2,7,0,11); + const int DEBUGGER_VERSION = MAKE_VERSION(2,7,0,17); // Public _________________________________________________________________________________________ @@ -1586,7 +1586,7 @@ void _BWZ_List( const Breakpoint_t * aBreakWatchZero, const int iBWZ ) //, bool void _BWZ_ListAll( const Breakpoint_t * aBreakWatchZero, const int nMax ) { int iBWZ = 0; - while (iBWZ < MAX_BOOKMARKS) + while (iBWZ < nMax) // { if (aBreakWatchZero[ iBWZ ].bSet) { @@ -3783,7 +3783,7 @@ static Update_t _CmdMemoryDump (int nArgs, int iWhich, int iView ) g_aMemDump[iWhich].bActive = true; g_aMemDump[iWhich].eView = (MemoryView_e) iView; - return UPDATE_ALL; // TODO: This really needed? Don't think we do any actual ouput + return UPDATE_MEM_DUMP; // TODO: This really needed? Don't think we do any actual ouput } //=========================================================================== @@ -5683,7 +5683,8 @@ Update_t CmdWatchList (int nArgs) } else { - _BWZ_List( g_aWatches, MAX_WATCHES ); +// _BWZ_List( g_aWatches, MAX_WATCHES ); + _BWZ_ListAll( g_aWatches, MAX_WATCHES ); } return ConsoleUpdate(); } diff --git a/AppleWin/source/Debugger/Debugger_Commands.cpp b/AppleWin/source/Debugger/Debugger_Commands.cpp index 986c7a57..7db33525 100644 --- a/AppleWin/source/Debugger/Debugger_Commands.cpp +++ b/AppleWin/source/Debugger/Debugger_Commands.cpp @@ -184,7 +184,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // {TEXT("MH1") , CmdMemoryMiniDumpHigh, CMD_MEM_MINI_DUMP_TXT_HI_1, "Text (High) in mini memory dump area 1" }, // {TEXT("MH2") , CmdMemoryMiniDumpHigh, CMD_MEM_MINI_DUMP_TXT_HI_2, "Text (High) in mini memory dump area 2" }, - {TEXT("ME") , CmdMemoryEdit , CMD_MEMORY_EDIT }, // TODO: like Copy ][+ Sector Edit + {TEXT("ME") , CmdMemoryEdit , CMD_MEMORY_EDIT , "Memory Editor - Not Implemented!" }, // TODO: like Copy ][+ Sector Edit {TEXT("MEB") , CmdMemoryEnterByte , CMD_MEMORY_ENTER_BYTE , "Enter byte" }, {TEXT("MEW") , CmdMemoryEnterWord , CMD_MEMORY_ENTER_WORD , "Enter word" }, {TEXT("BLOAD") , CmdMemoryLoad , CMD_MEMORY_LOAD , "Load a region of memory" }, @@ -342,7 +342,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // {TEXT("RET") , CmdStackReturn , CMD_STACK_RETURN }, {TEXT("TRACE") , CmdTrace , CMD_TRACE }, - {TEXT("SYMBOLS") , CmdSymbols , CMD_SYMBOLS_LOOKUP , "Return " }, +// {TEXT("SYMBOLS") , CmdSymbols , CMD_SYMBOLS_LOOKUP , "Return " }, // {TEXT("SYMBOLS1") , CmdSymbolsInfo , CMD_SYMBOLS_1 }, // {TEXT("SYMBOLS2") , CmdSymbolsInfo , CMD_SYMBOLS_2 }, // {"SYM0" , CmdSymbolsInfo , CMD_SYMBOLS_ROM }, @@ -359,7 +359,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA {TEXT("TEXT41") , CmdViewOutput_Text41 , CMD_VIEW_TEXT41 }, {TEXT("TEXT42") , CmdViewOutput_Text42 , CMD_VIEW_TEXT42 }, - {TEXT("WATCH") , CmdWatchAdd , CMD_WATCH_ADD }, +// {TEXT("WATCH") , CmdWatchAdd , CMD_WATCH_ADD }, {TEXT("WINDOW") , CmdWindow , CMD_WINDOW }, // {TEXT("W?") , CmdWatchAdd , CMD_WATCH_ADD }, {TEXT("ZAP") , CmdNOP , CMD_NOP }, @@ -368,7 +368,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA {TEXT("BENCH") , CmdBenchmarkStart , CMD_BENCHMARK }, {TEXT("EXITBENCH") , CmdBenchmarkStop , CMD_BENCHMARK }, {TEXT("MDB") , CmdMemoryMiniDumpHex , CMD_MEM_MINI_DUMP_HEX_1 }, // MemoryDumpByte // Did anyone actually use this?? - {TEXT("MEMORY") , CmdMemoryMiniDumpHex , CMD_MEM_MINI_DUMP_HEX_1 }, // MemoryDumpByte // Did anyone actually use this?? +// {TEXT("MEMORY") , CmdMemoryMiniDumpHex , CMD_MEM_MINI_DUMP_HEX_1 }, // MemoryDumpByte // Did anyone actually use this?? }; const int NUM_COMMANDS_WITH_ALIASES = sizeof(g_aCommands) / sizeof (Command_t); // Determined at compile-time ;-) diff --git a/AppleWin/source/Debugger/Debugger_Help.cpp b/AppleWin/source/Debugger/Debugger_Help.cpp index a908a48e..5b8b692e 100644 --- a/AppleWin/source/Debugger/Debugger_Help.cpp +++ b/AppleWin/source/Debugger/Debugger_Help.cpp @@ -505,7 +505,10 @@ Update_t CmdHelpSpecific (int nArgs) { // int nFoundCategory = FindParam( g_aArgs[ iArg ].sArg, MATCH_EXACT, iParam, _PARAM_HELPCATEGORIES_BEGIN, _PARAM_HELPCATEGORIES_END ); int nFoundCategory = FindParam( g_aArgs[ iArg ].sArg, MATCH_FUZZY, iParam, _PARAM_HELPCATEGORIES_BEGIN, _PARAM_HELPCATEGORIES_END ); - bCategory = true; + if( nFoundCategory ) + bCategory = true; + else + bCategory = false; switch( iParam ) { case PARAM_CAT_BOOKMARKS : iCmdBegin = CMD_BOOKMARK ; iCmdEnd = CMD_BOOKMARK_SAVE ; break; @@ -513,21 +516,17 @@ Update_t CmdHelpSpecific (int nArgs) case PARAM_CAT_CONFIG : iCmdBegin = CMD_BENCHMARK ; iCmdEnd = CMD_CONFIG_SAVE ; break; case PARAM_CAT_CPU : iCmdBegin = CMD_ASSEMBLE ; iCmdEnd = CMD_UNASSEMBLE ; break; case PARAM_CAT_FLAGS : - // iCmdBegin = CMD_FLAG_CLEAR ; iCmdEnd = CMD_FLAG_SET_N ; break; - // HACK: check if we have an exact command match first - nFound = FindCommand( g_aArgs[iArg].sArg, pFunction, & iCommand ); - if (nFound && (iCommand != CMD_MEMORY_FILL)) + nFound = FindCommand( g_aArgs[iArg].sArg, pFunction, & iCommand ); // check if we have an exact command match first + if ( nFound ) // && (iCommand != CMD_MEMORY_FILL)) + bCategory = false; + else if ( nFoundCategory ) { iCmdBegin = CMD_FLAG_CLEAR ; iCmdEnd = CMD_FLAG_SET_N; - bCategory = true; } - else - bCategory = false; break; case PARAM_CAT_HELP : iCmdBegin = CMD_HELP_LIST ; iCmdEnd = CMD_MOTD ; break; case PARAM_CAT_KEYBOARD : - // HACK: check if we have an exact command match first - nFound = FindCommand( g_aArgs[iArg].sArg, pFunction, & iCommand ); + nFound = FindCommand( g_aArgs[iArg].sArg, pFunction, & iCommand ); // check if we have an exact command match first if ((!nFound) || (iCommand != CMD_INPUT_KEY)) { nArgs = 0; @@ -536,71 +535,51 @@ Update_t CmdHelpSpecific (int nArgs) bCategory = false; break; case PARAM_CAT_MEMORY : - // iCmdBegin = CMD_MEMORY_COMPARE ; iCmdEnd = CMD_MEMORY_FILL ; break; - nFound = FindCommand( g_aArgs[iArg].sArg, pFunction, & iCommand ); - if (nFound && (iCommand != CMD_MEMORY_MOVE)) - { - iCmdBegin = CMD_MEMORY_COMPARE ; iCmdEnd = CMD_MEMORY_FILL ; - bCategory = true; - } - else + nFound = FindCommand( g_aArgs[iArg].sArg, pFunction, & iCommand ); // check if we have an exact command match first + if ( nFound )// && (iCommand != CMD_MEMORY_MOVE)) bCategory = false; + else if ( nFoundCategory ) + { + iCmdBegin = CMD_MEMORY_COMPARE ; iCmdEnd = CMD_MEMORY_FILL ; + } break; - case PARAM_CAT_OUTPUT : - // HACK: check if we have an exact command match first - nFound = FindCommand( g_aArgs[iArg].sArg, pFunction, & iCommand ); - if (nFound && (iCommand != CMD_OUT)) + nFound = FindCommand( g_aArgs[iArg].sArg, pFunction, & iCommand ); // check if we have an exact command match first + if ( nFound ) // && (iCommand != CMD_OUT)) + bCategory = false; + else if ( nFoundCategory ) { - iCmdBegin = CMD_OUTPUT_CALC ; iCmdEnd = CMD_OUTPUT_RUN ; - bCategory = true; + iCmdBegin = CMD_OUTPUT_CALC ; iCmdEnd = CMD_OUTPUT_RUN ; } - else - bCategory = false; break; - case PARAM_CAT_SYMBOLS : - // HACK: check if we have an exact command match first - nFound = FindCommand( g_aArgs[iArg].sArg, pFunction, & iCommand ); - if (nFound && (iCommand != CMD_SYMBOLS_LOOKUP) && (iCommand != CMD_MEMORY_SEARCH)) + nFound = FindCommand( g_aArgs[iArg].sArg, pFunction, & iCommand ); // check if we have an exact command match first + if ( nFound ) // && (iCommand != CMD_SYMBOLS_LOOKUP) && (iCommand != CMD_MEMORY_SEARCH)) + bCategory = false; + else if ( nFoundCategory ) { - iCmdBegin = CMD_SYMBOLS_LOOKUP ; iCmdEnd = CMD_SYMBOLS_LIST ; - bCategory = true; + iCmdBegin = CMD_SYMBOLS_LOOKUP ; iCmdEnd = CMD_SYMBOLS_LIST ; } - else - bCategory = false; break; - case PARAM_CAT_VIEW : - // HACK: check if we have an exact command match first -// nFound = FindCommand( g_aArgs[iArg].sArg, pFunction, & iCommand ); -// if (nFound && (iCommand != CMD_VIEW_TEXT4X)) { - iCmdBegin = CMD_VIEW_TEXT4X ; iCmdEnd = CMD_VIEW_DHGR2 ; - bCategory = true; + iCmdBegin = CMD_VIEW_TEXT4X ; iCmdEnd = CMD_VIEW_DHGR2 ; } -// else -// bCategory = false; break; - case PARAM_CAT_WATCHES : - // HACK: check if we have an exact command match first - nFound = FindCommand( g_aArgs[iArg].sArg, pFunction, & iCommand ); - if (nFound && (iCommand != CMD_WATCH_ADD)) - { - iCmdBegin = CMD_WATCH_ADD ; iCmdEnd = CMD_WATCH_LIST ; - bCategory = true; - } - else - bCategory = false; + nFound = FindCommand( g_aArgs[iArg].sArg, pFunction, & iCommand ); // check if we have an exact command match first + if (nFound) { + bCategory = false; + } else // 2.7.0.17: HELP wasn't dipslaying when category was one of: FLAGS, OUTPUT, WATCHES + if( nFoundCategory ) + { + iCmdBegin = CMD_WATCH_ADD ; iCmdEnd = CMD_WATCH_LIST ; + } break; - case PARAM_CAT_WINDOW : iCmdBegin = CMD_WINDOW ; iCmdEnd = CMD_WINDOW_OUTPUT ; break; - case PARAM_CAT_ZEROPAGE : iCmdBegin = CMD_ZEROPAGE_POINTER; iCmdEnd = CMD_ZEROPAGE_POINTER_SAVE;break; - + case PARAM_CAT_ZEROPAGE : iCmdBegin = CMD_ZEROPAGE_POINTER; iCmdEnd = CMD_ZEROPAGE_POINTER_SAVE; break; // case PARAM_CAT_EXPRESSION : // fall-through case PARAM_CAT_OPERATORS : nArgs = 0; Help_Operators(); break; - case PARAM_CAT_RANGE : // HACK: check if we have an exact command match first nFound = FindCommand( g_aArgs[iArg].sArg, pFunction, & iCommand );