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

Function DebugBegin

source/Debugger/Debug.cpp:8887–8939  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

8885
8886//===========================================================================
8887void DebugBegin ()
8888{
8889 // This is called every time the debugger is entered.
8890
8891 GetDebuggerMemDC();
8892
8893 g_nAppMode = MODE_DEBUG;
8894 GetFrame().FrameRefreshStatus(DRAW_TITLE | DRAW_DISK_STATUS);
8895
8896 if (GetMainCpu() == CPU_6502)
8897 {
8898 g_aOpcodes = & g_aOpcodes6502[ 0 ]; // Apple ][, ][+, //e
8899 g_aOpmodes[ AM_2 ].m_nBytes = 1;
8900 g_aOpmodes[ AM_3 ].m_nBytes = 1;
8901 }
8902 else
8903 {
8904 g_aOpcodes = & g_aOpcodes65C02[ 0 ]; // Enhanced Apple //e
8905 g_aOpmodes[ AM_2 ].m_nBytes = 2;
8906 g_aOpmodes[ AM_3 ].m_nBytes = 3;
8907 }
8908
8909 InitDisasm();
8910
8911 DebugVideoMode::Instance().Reset();
8912 UpdateDisplay( UPDATE_ALL );
8913
8914 g_LBR = LBR_UNDEFINED; // reset LBR, so LBR isn't stale from a previous debugging session
8915
8916#if DEBUG_APPLE_FONT
8917 int iFG = 7;
8918 int iBG = 4;
8919
8920// DebuggerSetColorFG( aColors[ iFG ] );
8921// DebuggerSetColorBG( aColors[ iBG ] );
8922
8923 int iChar = 0;
8924 int x = 0;
8925 int y = 0;
8926 for (iChar = 0; iChar < 256; iChar++)
8927 {
8928 x = (iChar % 16);
8929 y = (iChar / 16);
8930
8931 iFG = (x >> 1); // (iChar % 8);
8932 iBG = (y >> 1) & 7; // (iChar / 8) & 7;
8933 DebuggerSetColorFG( aConsoleColors[ iFG ] );
8934 DebuggerSetColorBG( aConsoleColors[ iBG ] );
8935
8936 DebuggerPrintChar( x * (APPLE_FONT_WIDTH / 2), y * (APPLE_FONT_HEIGHT / 2), iChar );
8937 }
8938#endif
8939}
8940
8941//===========================================================================
8942bool DebugQueryAnyBreakpointsSet()

Callers 1

ProcessButtonClickMethod · 0.85

Calls 8

GetDebuggerMemDCFunction · 0.85
InitDisasmFunction · 0.85
UpdateDisplayFunction · 0.85
DebuggerSetColorFGFunction · 0.85
DebuggerSetColorBGFunction · 0.85
FrameRefreshStatusMethod · 0.80
GetMainCpuFunction · 0.50
ResetMethod · 0.45

Tested by

no test coverage detected