From 87cf636f146daf6da2b50f0364d7f05f4ac382d9 Mon Sep 17 00:00:00 2001 From: mpohoreski Date: Sun, 20 Feb 2011 07:31:08 +0000 Subject: [PATCH] 2.7.0.10 Added: Watches now show (dynamic) raw hex bytes Changed: Lowered watches down from 16 to 8. --- AppleWin/source/Debugger/Debug.cpp | 2 +- AppleWin/source/Debugger/Debugger_Display.cpp | 48 ++++++++++++++++--- AppleWin/source/Debugger/Debugger_Types.h | 2 +- 3 files changed, 44 insertions(+), 8 deletions(-) diff --git a/AppleWin/source/Debugger/Debug.cpp b/AppleWin/source/Debugger/Debug.cpp index 1dd373a0..9c58b251 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,9); + const int DEBUGGER_VERSION = MAKE_VERSION(2,7,0,10); // Public _________________________________________________________________________________________ diff --git a/AppleWin/source/Debugger/Debugger_Display.cpp b/AppleWin/source/Debugger/Debugger_Display.cpp index 733ee25e..47135a99 100644 --- a/AppleWin/source/Debugger/Debugger_Display.cpp +++ b/AppleWin/source/Debugger/Debugger_Display.cpp @@ -2869,23 +2869,59 @@ void DrawWatches (int line) DebuggerSetColorFG( DebuggerGetColor( FG_INFO_OPERATOR )); PrintTextCursorX( ":", rect2 ); - BYTE nTarget8 = (unsigned)*(LPBYTE)(mem+g_aWatches[iWatch].nAddress); + BYTE nTarget8 = 0; + BYTE nValue8 = 0; + + nTarget8 = (unsigned)*(LPBYTE)(mem+g_aWatches[iWatch].nAddress); sprintf(sText,"%02X", nTarget8 ); DebuggerSetColorFG( DebuggerGetColor( FG_INFO_OPCODE )); PrintTextCursorX( sText, rect2 ); + nTarget8 = (unsigned)*(LPBYTE)(mem+g_aWatches[iWatch].nAddress + 1); + sprintf(sText,"%02X", nTarget8 ); + DebuggerSetColorFG( DebuggerGetColor( FG_INFO_OPCODE )); + PrintTextCursorX( sText, rect2 ); + + sprintf( sText,"(" ); + DebuggerSetColorFG( DebuggerGetColor( FG_INFO_OPERATOR )); + PrintTextCursorX( sText, rect2 ); + WORD nTarget16 = (unsigned)*(LPWORD)(mem+g_aWatches[iWatch].nAddress); - sprintf( sText," %04X", nTarget16 ); + sprintf( sText,"%04X", nTarget16 ); DebuggerSetColorFG( DebuggerGetColor( FG_INFO_ADDRESS )); PrintTextCursorX( sText, rect2 ); DebuggerSetColorFG( DebuggerGetColor( FG_INFO_OPERATOR )); - PrintTextCursorX( ":", rect2 ); +// PrintTextCursorX( ":", rect2 ); + PrintTextCursorX( ")", rect2 ); + +// BYTE nValue8 = (unsigned)*(LPBYTE)(mem + nTarget16); +// sprintf(sText,"%02X", nValue8 ); +// DebuggerSetColorFG( DebuggerGetColor( FG_INFO_OPCODE )); +// PrintTextCursorX( sText, rect2 ); + + rect.top += g_nFontHeight; + rect.bottom += g_nFontHeight; + +// 1.19.4 Added: Watch show (dynamic) raw hex bytes + rect2 = rect; - BYTE nValue8 = (unsigned)*(LPBYTE)(mem + nTarget16); - sprintf(sText,"%02X", nValue8 ); DebuggerSetColorFG( DebuggerGetColor( FG_INFO_OPCODE )); - PrintTextCursorX( sText, rect2 ); + for( int iByte = 0; iByte < 8; iByte++ ) + { + BYTE nValue8 = (unsigned)*(LPBYTE)(mem + nTarget16 + iByte ); + sprintf(sText,"%02X", nValue8 ); + if ((iByte & 1) == 1) + DebuggerSetColorBG( DebuggerGetColor( BG_DATA_2 )); + else + DebuggerSetColorBG( DebuggerGetColor( WATCH_ZERO_BG )); // BG_DATA_2 + PrintTextCursorX( sText, rect2 ); + + if ((iByte & 3) == 3) { + DebuggerSetColorBG( DebuggerGetColor( WATCH_ZERO_BG )); // BG_INFO + PrintTextCursorX( " ", rect2 ); + } + } } rect.top += g_nFontHeight; rect.bottom += g_nFontHeight; diff --git a/AppleWin/source/Debugger/Debugger_Types.h b/AppleWin/source/Debugger/Debugger_Types.h index 1aad5c4e..c79b7a8a 100644 --- a/AppleWin/source/Debugger/Debugger_Types.h +++ b/AppleWin/source/Debugger/Debugger_Types.h @@ -1465,7 +1465,7 @@ const DisasmData_t* pDisasmData; enum { - MAX_WATCHES = 16 + MAX_WATCHES = 8 };