MCPcopy Index your code
hub / github.com/AppleWin/AppleWin / CmdBreakpointSave

Function CmdBreakpointSave

source/Debugger/Debug.cpp:2313–2355  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

2311
2312//===========================================================================
2313Update_t CmdBreakpointSave (int nArgs)
2314{
2315 g_ConfigState.Reset();
2316
2317 ConfigSave_PrepareHeader( PARAM_CAT_BREAKPOINTS, CMD_BREAKPOINT_CLEAR );
2318
2319 int iBreakpoint = 0;
2320 while (iBreakpoint < MAX_BREAKPOINTS)
2321 {
2322 if (g_aBreakpoints[ iBreakpoint ].bSet)
2323 {
2324 g_ConfigState.PushLineFormat( "%s %x %04X,%04X\n"
2325 , g_aCommands[ CMD_BREAKPOINT_ADD_REG ].m_sName
2326 , iBreakpoint
2327 , g_aBreakpoints[ iBreakpoint ].nAddress
2328 , g_aBreakpoints[ iBreakpoint ].nLength
2329 );
2330 }
2331 if (! g_aBreakpoints[ iBreakpoint ].bEnabled)
2332 {
2333 g_ConfigState.PushLineFormat( "%s %x\n"
2334 , g_aCommands[ CMD_BREAKPOINT_DISABLE ].m_sName
2335 , iBreakpoint
2336 );
2337 }
2338
2339 iBreakpoint++;
2340 }
2341
2342 if (nArgs)
2343 {
2344 if (! (g_aArgs[ 1 ].bType & TYPE_QUOTED_2))
2345 return Help_Arg_1( CMD_BREAKPOINT_SAVE );
2346
2347 if (ConfigSave_BufferToDisk( g_aArgs[ 1 ].sArg, CONFIG_SAVE_FILE_CREATE ))
2348 {
2349 ConsoleBufferPush( "Saved." );
2350 return ConsoleUpdate();
2351 }
2352 }
2353
2354 return UPDATE_CONSOLE_DISPLAY;
2355}
2356
2357// Assembler ______________________________________________________________________________________
2358

Callers 1

CmdConfigSaveFunction · 0.85

Calls 7

ConfigSave_PrepareHeaderFunction · 0.85
Help_Arg_1Function · 0.85
ConfigSave_BufferToDiskFunction · 0.85
PushLineFormatMethod · 0.80
ConsoleBufferPushFunction · 0.70
ConsoleUpdateFunction · 0.70
ResetMethod · 0.45

Tested by

no test coverage detected