Debugger: Extend 'cycles' command to do (partial) timings relative to a user-specified instruction (#787) (PR #789)

This commit is contained in:
TomCh
2020-05-23 18:40:12 +01:00
committed by GitHub
parent 13a4043118
commit a8671f7a6a
6 changed files with 38 additions and 9 deletions

View File

@@ -6909,11 +6909,16 @@ Update_t CmdCyclesInfo(int nArgs)
else
{
if (strcmp(g_aArgs[1].sArg, "abs") == 0)
g_videoScannerDisplayInfo.isAbsCycle = true;
g_videoScannerDisplayInfo.cycleMode = VideoScannerDisplayInfo::abs;
else if (strcmp(g_aArgs[1].sArg, "rel") == 0)
g_videoScannerDisplayInfo.isAbsCycle = false;
g_videoScannerDisplayInfo.cycleMode = VideoScannerDisplayInfo::rel;
else if (strcmp(g_aArgs[1].sArg, "part") == 0)
g_videoScannerDisplayInfo.cycleMode = VideoScannerDisplayInfo::part;
else
return Help_Arg_1(CMD_CYCLES_INFO);
if (g_videoScannerDisplayInfo.cycleMode == VideoScannerDisplayInfo::part)
CmdCyclesReset(0);
}
TCHAR sText[CONSOLE_WIDTH];
@@ -6923,6 +6928,12 @@ Update_t CmdCyclesInfo(int nArgs)
return UPDATE_ALL;
}
Update_t CmdCyclesReset(int /*nArgs*/)
{
g_videoScannerDisplayInfo.savedCumulativeCycles = g_nCumulativeCycles;
return UPDATE_ALL;
}
// View ___________________________________________________________________________________________
// See: CmdWindowViewOutput (int nArgs)