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

Function CmdBreakOnInterrupt

source/Debugger/Debug.cpp:1051–1086  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1049
1050//===========================================================================
1051Update_t CmdBreakOnInterrupt (int nArgs)
1052{
1053 if (nArgs > 1)
1054 return HelpLastCommand();
1055
1056 int iParamArg = nArgs;
1057 int iParam;
1058 int nFound = FindParam(g_aArgs[iParamArg].sArg, MATCH_EXACT, iParam, _PARAM_GENERAL_BEGIN, _PARAM_GENERAL_END);
1059
1060 int nActive = -1;
1061 if (nFound)
1062 {
1063 if (iParam == PARAM_ON)
1064 nActive = 1;
1065 else if (iParam == PARAM_OFF)
1066 nActive = 0;
1067 }
1068
1069 if (nArgs == 1 && nActive == -1)
1070 return HelpLastCommand();
1071
1072 char sAction[CONSOLE_WIDTH] = "Current"; // default to display
1073
1074 if (nArgs == 1)
1075 {
1076 g_bDebugBreakOnInterrupt = (iParam == PARAM_ON) ? true : false;
1077 strcpy(sAction, "Setting");
1078 }
1079
1080 ConsoleBufferPushFormat("%s Break on Interrupt: %s"
1081 , sAction
1082 , g_bDebugBreakOnInterrupt ? "Enabled" : "Disabled"
1083 );
1084
1085 return ConsoleUpdate();
1086}
1087
1088
1089// bool bBP = g_nBreakpoints && CheckBreakpoint(nOffset,nOffset == regs.pc);

Callers

nothing calls this directly

Calls 4

HelpLastCommandFunction · 0.85
FindParamFunction · 0.85
ConsoleBufferPushFormatFunction · 0.85
ConsoleUpdateFunction · 0.70

Tested by

no test coverage detected