===========================================================================
| 2311 | |
| 2312 | //=========================================================================== |
| 2313 | Update_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 |
no test coverage detected