mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-11 21:29:43 +00:00
2.7.x.x Started work on cleanup of proper sub-panel display
2.6.2.22 Changed: Re-enabled magenta/purple for warnings (i.e. symbol table disabled) 2.6.2.21 Fixed: Missing GPL / copyright on some debugger files, updated year.
This commit is contained in:
parent
832c0b1088
commit
df64f2d1b1
@ -23,13 +23,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
|
|
||||||
/* Description: Debugger
|
/* Description: Debugger
|
||||||
*
|
*
|
||||||
* Author: Copyright (C) 2006, Michael Pohoreski
|
* Author: Copyright (C) 2006-2010 Michael Pohoreski
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "StdAfx.h"
|
#include "StdAfx.h"
|
||||||
|
|
||||||
|
|
||||||
// NEW UI debugging
|
// NEW UI debugging - force display ALL meta-info (regs, stack, bp, watches, zp) for debugging purposes
|
||||||
#define DEBUG_FORCE_DISPLAY 0
|
#define DEBUG_FORCE_DISPLAY 0
|
||||||
|
|
||||||
#if _DEBUG
|
#if _DEBUG
|
||||||
@ -57,6 +57,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
|
|
||||||
// Private ________________________________________________________________________________________
|
// Private ________________________________________________________________________________________
|
||||||
|
|
||||||
|
|
||||||
|
// HACK HACK HACK
|
||||||
|
//g_nDisasmWinHeight
|
||||||
|
WindowSplit_t *g_pDisplayWindow = 0; // HACK
|
||||||
|
// HACK
|
||||||
|
|
||||||
// Display - Win32
|
// Display - Win32
|
||||||
// HDC g_hDstDC = NULL; // App Window
|
// HDC g_hDstDC = NULL; // App Window
|
||||||
|
|
||||||
@ -67,19 +73,21 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
HBRUSH g_hConsoleBrushFG = NULL;
|
HBRUSH g_hConsoleBrushFG = NULL;
|
||||||
HBRUSH g_hConsoleBrushBG = NULL;
|
HBRUSH g_hConsoleBrushBG = NULL;
|
||||||
|
|
||||||
|
// NOTE: Keep in sync ConsoleColors_e g_anConsoleColor !
|
||||||
COLORREF g_anConsoleColor[ NUM_CONSOLE_COLORS ] =
|
COLORREF g_anConsoleColor[ NUM_CONSOLE_COLORS ] =
|
||||||
{
|
{ // # <Bright Blue Green Red>
|
||||||
RGB( 0, 0, 0 ), // 0 000 K
|
RGB( 0, 0, 0 ), // 0 0000 K
|
||||||
RGB( 255, 32, 32 ), // 1 001 R
|
RGB( 255, 32, 32 ), // 1 1001 R
|
||||||
RGB( 0, 255, 0 ), // 2 010 G
|
RGB( 0, 255, 0 ), // 2 1010 G
|
||||||
RGB( 255, 255, 0 ), // 3 011 Y
|
RGB( 255, 255, 0 ), // 3 1011 Y
|
||||||
RGB( 64, 64, 255 ), // 4 100 B
|
RGB( 64, 64, 255 ), // 4 1100 B
|
||||||
// RGB( 255, 0, 255 ), // 5 101 M Purple/Magenta is useless
|
RGB( 255, 0, 255 ), // 5 1101 M Purple/Magenta now used for warnings.
|
||||||
RGB( 80, 192, 255 ),
|
RGB( 0, 255, 255 ), // 6 1110 C
|
||||||
RGB( 0, 255, 255 ), // 6 110 C
|
RGB( 255, 255, 255 ), // 7 1111 W
|
||||||
RGB( 255, 255, 255 ), // 7 111 W
|
RGB( 255, 128, 0 ), // 8 0011 Orange
|
||||||
RGB( 255, 128, 0 ), // 8 Orange
|
RGB( 128, 128, 128 ), // 9 0111 Grey
|
||||||
RGB( 128, 128, 128 ) // 9 Grey
|
|
||||||
|
RGB( 80, 192, 255 ) // Lite Blue
|
||||||
};
|
};
|
||||||
|
|
||||||
// Disassembly
|
// Disassembly
|
||||||
@ -604,7 +612,7 @@ void PrintGlyph( const int x, const int y, const char glyph )
|
|||||||
|
|
||||||
SelectObject( g_hDstDC, g_hConsoleBrushFG );
|
SelectObject( g_hDstDC, g_hConsoleBrushFG );
|
||||||
|
|
||||||
// Use Source ask mask to make color Pattern mask (AND), then apply to dest (OR)
|
// Use Source as mask to make color Pattern mask (AND), then apply to dest (OR)
|
||||||
// D | (P & S) -> DPSao
|
// D | (P & S) -> DPSao
|
||||||
BitBlt(
|
BitBlt(
|
||||||
g_hFrameDC,
|
g_hFrameDC,
|
||||||
@ -2854,8 +2862,14 @@ void DrawSubWindow_Data (Update_t bUpdate)
|
|||||||
DEVICE_e eDevice = pMD->eDevice;
|
DEVICE_e eDevice = pMD->eDevice;
|
||||||
MemoryView_e iView = pMD->eView;
|
MemoryView_e iView = pMD->eView;
|
||||||
|
|
||||||
if (!pMD->bActive)
|
// if (!pMD->bActive)
|
||||||
return;
|
// return;
|
||||||
|
|
||||||
|
// int iWindows = g_iThisWindow;
|
||||||
|
// WindowSplit_t * pWindow = &g_aWindowConfig[ iWindow ];
|
||||||
|
|
||||||
|
RECT rect;
|
||||||
|
rect.top = 0 + 0;
|
||||||
|
|
||||||
int iByte;
|
int iByte;
|
||||||
WORD iAddress = nAddress;
|
WORD iAddress = nAddress;
|
||||||
@ -2881,9 +2895,7 @@ void DrawSubWindow_Data (Update_t bUpdate)
|
|||||||
int nFontHeight = g_aFontConfig[ FONT_DISASM_DEFAULT ]._nLineHeight;
|
int nFontHeight = g_aFontConfig[ FONT_DISASM_DEFAULT ]._nLineHeight;
|
||||||
|
|
||||||
// Draw
|
// Draw
|
||||||
RECT rect;
|
|
||||||
rect.left = 0;
|
rect.left = 0;
|
||||||
rect.top = iLine * nFontHeight;
|
|
||||||
rect.right = DISPLAY_DISASM_RIGHT;
|
rect.right = DISPLAY_DISASM_RIGHT;
|
||||||
rect.bottom = rect.top + nFontHeight;
|
rect.bottom = rect.top + nFontHeight;
|
||||||
|
|
||||||
@ -2964,6 +2976,8 @@ void DrawSubWindow_Data (Update_t bUpdate)
|
|||||||
PrintTextCursorX( " | ", rect );
|
PrintTextCursorX( " | ", rect );
|
||||||
|
|
||||||
nAddress += nMaxOpcodes;
|
nAddress += nMaxOpcodes;
|
||||||
|
|
||||||
|
rect.top += nFontHeight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3015,39 +3029,26 @@ void DrawSubWindow_Info( int iWindow )
|
|||||||
// if ((MAX_DISPLAY_BREAKPOINTS_LINES + MAX_DISPLAY_WATCHES_LINES) < 12)
|
// if ((MAX_DISPLAY_BREAKPOINTS_LINES + MAX_DISPLAY_WATCHES_LINES) < 12)
|
||||||
// yWatches++;
|
// yWatches++;
|
||||||
|
|
||||||
#if DEBUG_FORCE_DISPLAY
|
bool bForceDisplayBreakpoints = DEBUG_FORCE_DISPLAY ? DEBUG_FORCE_DISPLAY : g_nBreakpoints & 1;
|
||||||
if (true)
|
if ( bForceDisplayBreakpoints )
|
||||||
#else
|
|
||||||
if (g_nBreakpoints)
|
|
||||||
#endif
|
|
||||||
DrawBreakpoints( yBreakpoints );
|
DrawBreakpoints( yBreakpoints );
|
||||||
|
|
||||||
#if DEBUG_FORCE_DISPLAY
|
bool bForceDisplayWatches = DEBUG_FORCE_DISPLAY ? DEBUG_FORCE_DISPLAY : g_nWatches & 1;
|
||||||
if (true)
|
if ( bForceDisplayWatches )
|
||||||
#else
|
|
||||||
if (g_nWatches)
|
|
||||||
#endif
|
|
||||||
DrawWatches( yWatches );
|
DrawWatches( yWatches );
|
||||||
|
|
||||||
g_nDisplayMemoryLines = MAX_DISPLAY_MEMORY_LINES_1;
|
g_nDisplayMemoryLines = MAX_DISPLAY_MEMORY_LINES_1;
|
||||||
|
|
||||||
#if DEBUG_FORCE_DISPLAY
|
bool bForceDisplayMemory1 = DEBUG_FORCE_DISPLAY ? DEBUG_FORCE_DISPLAY : g_aMemDump[0].bActive;
|
||||||
if (true)
|
if ( bForceDisplayMemory1 )
|
||||||
#else
|
|
||||||
if (g_aMemDump[0].bActive)
|
|
||||||
#endif
|
|
||||||
DrawMemory( yMemory, 0 ); // g_aMemDump[0].nAddress, g_aMemDump[0].eDevice);
|
DrawMemory( yMemory, 0 ); // g_aMemDump[0].nAddress, g_aMemDump[0].eDevice);
|
||||||
|
|
||||||
yMemory += (g_nDisplayMemoryLines + 1);
|
yMemory += (g_nDisplayMemoryLines + 1);
|
||||||
g_nDisplayMemoryLines = MAX_DISPLAY_MEMORY_LINES_2;
|
g_nDisplayMemoryLines = MAX_DISPLAY_MEMORY_LINES_2;
|
||||||
|
|
||||||
#if DEBUG_FORCE_DISPLAY
|
bool bForceDisplayMemory2 = DEBUG_FORCE_DISPLAY ? DEBUG_FORCE_DISPLAY : g_aMemDump[1].bActive;
|
||||||
if (true)
|
if ( bForceDisplayMemory2 )
|
||||||
#else
|
|
||||||
if (g_aMemDump[1].bActive)
|
|
||||||
#endif
|
|
||||||
DrawMemory( yMemory, 1 ); // g_aMemDump[1].nAddress, g_aMemDump[1].eDevice);
|
DrawMemory( yMemory, 1 ); // g_aMemDump[1].nAddress, g_aMemDump[1].eDevice);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
@ -3346,12 +3347,11 @@ void DrawWindowBottom ( Update_t bUpdate, int iWindow )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
WindowSplit_t * pWindow = &g_aWindowConfig[ iWindow ];
|
WindowSplit_t * pWindow = &g_aWindowConfig[ iWindow ];
|
||||||
|
g_pDisplayWindow = pWindow;
|
||||||
|
|
||||||
// if (pWindow->eBot == WINDOW_DATA)
|
if (pWindow->eBot == WINDOW_DATA)
|
||||||
// {
|
DrawWindow_Data( bUpdate ); // false
|
||||||
// DrawWindow_Data( bUpdate, false );
|
else
|
||||||
// }
|
|
||||||
|
|
||||||
if (pWindow->eBot == WINDOW_SOURCE)
|
if (pWindow->eBot == WINDOW_SOURCE)
|
||||||
DrawSubWindow_Source2( bUpdate );
|
DrawSubWindow_Source2( bUpdate );
|
||||||
}
|
}
|
||||||
@ -3361,6 +3361,8 @@ void DrawSubWindow_Code ( int iWindow )
|
|||||||
{
|
{
|
||||||
int nLines = g_nDisasmWinHeight;
|
int nLines = g_nDisasmWinHeight;
|
||||||
|
|
||||||
|
// WindowSplit_t * pWindow = &g_aWindowConfig[ iWindow ];
|
||||||
|
|
||||||
// Check if we have a bad disasm
|
// Check if we have a bad disasm
|
||||||
// BUG: This still doesn't catch all cases
|
// BUG: This still doesn't catch all cases
|
||||||
// G FB53, SPACE, PgDn *
|
// G FB53, SPACE, PgDn *
|
||||||
|
Loading…
x
Reference in New Issue
Block a user