MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / DrawBreakpoints

Function DrawBreakpoints

source/Debugger/Debugger_Display.cpp:1062–1248  ·  view source on GitHub ↗

===========================================================================

Source from the content-addressed store, hash-verified

1060
1061//===========================================================================
1062void DrawBreakpoints ( int line )
1063{
1064 if (! ((g_iWindowThis == WINDOW_CODE) || ((g_iWindowThis == WINDOW_DATA))))
1065 return;
1066
1067 RECT rect;
1068 rect.left = DISPLAY_BP_COLUMN;
1069 rect.top = (line * g_nFontHeight);
1070 rect.right = DISPLAY_WIDTH;
1071 rect.bottom = rect.top + g_nFontHeight;
1072
1073#if DISPLAY_BREAKPOINT_TITLE
1074 DebuggerSetColorBG( DebuggerGetColor( BG_INFO )); // COLOR_BG_DATA
1075 DebuggerSetColorFG( DebuggerGetColor( FG_INFO_TITLE )); //COLOR_STATIC
1076 PrintText("Breakpoints", rect );
1077 rect.top += g_nFontHeight;
1078 rect.bottom += g_nFontHeight;
1079#endif
1080
1081 int nBreakpointsDisplayed = 0;
1082
1083 int iBreakpoint;
1084 for (iBreakpoint = 0; iBreakpoint < MAX_BREAKPOINTS; iBreakpoint++ )
1085 {
1086 Breakpoint_t *pBP = &g_aBreakpoints[iBreakpoint];
1087 UINT nLength = pBP->nLength;
1088
1089#if DEBUG_FORCE_DISPLAY
1090 nLength = 2;
1091#endif
1092 if (nLength)
1093 {
1094 bool bSet = pBP->bSet;
1095 bool bEnabled = pBP->bEnabled;
1096 WORD nAddress1 = pBP->nAddress;
1097 WORD nAddress2 = nAddress1 + nLength - 1;
1098
1099#if DEBUG_FORCE_DISPLAY
1100// if (iBreakpoint < MAX_DISPLAY_BREAKPOINTS_LINES)
1101 bSet = true;
1102#endif
1103 if (! bSet)
1104 continue;
1105
1106 nBreakpointsDisplayed++;
1107
1108// if (nBreakpointsDisplayed > MAX_DISPLAY_BREAKPOINTS_LINES)
1109// break;
1110
1111 RECT rect2;
1112 rect2 = rect;
1113
1114 DebuggerSetColorBG( DebuggerGetColor( BG_INFO ));
1115 DebuggerSetColorFG( DebuggerGetColor( FG_INFO_TITLE ) );
1116 PrintTextCursorX( "B", rect2 );
1117
1118 DebuggerSetColorBG( DebuggerGetColor( BG_INFO ));
1119 DebuggerSetColorFG( DebuggerGetColor( FG_INFO_BULLET ) );

Callers 1

DrawSubWindow_InfoFunction · 0.85

Calls 9

DebuggerSetColorBGFunction · 0.85
DebuggerGetColorFunction · 0.85
DebuggerSetColorFGFunction · 0.85
PrintTextFunction · 0.85
PrintTextCursorXFunction · 0.85
StrFormatFunction · 0.85
WordToHexStrFunction · 0.85
GetDebuggerMemDCFunction · 0.85

Tested by

no test coverage detected