From a68a29bcd0c86e24d4b8229cfa4d4955e9908500 Mon Sep 17 00:00:00 2001 From: michaelangel007 Date: Sat, 1 Apr 2023 12:36:19 -0700 Subject: [PATCH] Debugger: More QoL when BP hit #1200 --- source/Debugger/Debug.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source/Debugger/Debug.cpp b/source/Debugger/Debug.cpp index d9a00c53..76914545 100644 --- a/source/Debugger/Debug.cpp +++ b/source/Debugger/Debug.cpp @@ -8698,22 +8698,22 @@ void DebugContinueStepping (const bool bCallerWillUpdateDisplay/*=false*/) stopReason = "Register matches value"; } else if (g_bDebugBreakpointHit & BP_HIT_MEM) - stopReason = StrFormat("Memory access at $%04X", g_uBreakMemoryAddress); + stopReason = StrFormat("Memory access at " CHC_ARG_SEP "$" CHC_ADDRESS "%04X", g_uBreakMemoryAddress); else if (g_bDebugBreakpointHit & BP_HIT_MEMW) - stopReason = StrFormat("Write access at $%04X", g_uBreakMemoryAddress); + stopReason = StrFormat("Write access at " CHC_ARG_SEP "$" CHC_ADDRESS "%04X", g_uBreakMemoryAddress); else if (g_bDebugBreakpointHit & BP_HIT_MEMR) - stopReason = StrFormat("Read access at $%04X", g_uBreakMemoryAddress); + stopReason = StrFormat("Read access at " CHC_ARG_SEP "$" CHC_ADDRESS "%04X", g_uBreakMemoryAddress); else if (g_bDebugBreakpointHit & BP_HIT_PC_READ_FLOATING_BUS_OR_IO_MEM) stopReason = "PC reads from floating bus or I/O memory"; else if (g_bDebugBreakpointHit & BP_HIT_INTERRUPT) stopReason = (g_LBR == LBR_UNDEFINED) ? StrFormat("Interrupt occurred (LBR unknown)") - : StrFormat("Interrupt occurred at $%04X", g_LBR); + : StrFormat("Interrupt occurred at " CHC_ARG_SEP "$" CHC_ADDRESS "%04X", g_LBR); else if (g_bDebugBreakpointHit & BP_HIT_VIDEO_POS) stopReason = StrFormat("Video scanner position matches at vpos=$%04X", NTSC_GetVideoVertForDebugger()); else if (g_bDebugBreakpointHit & BP_DMA_TO_IO_MEM) - stopReason = StrFormat("HDD DMA to I/O memory or ROM at $%04X", g_DebugBreakOnDMAIO.memoryAddr); + stopReason = StrFormat("HDD DMA to I/O memory or ROM at " CHC_ARG_SEP "$" CHC_ADDRESS "%04X", g_DebugBreakOnDMAIO.memoryAddr); else if (g_bDebugBreakpointHit & BP_DMA_FROM_IO_MEM) - stopReason = StrFormat("HDD DMA from I/O memory at $%04X ", g_DebugBreakOnDMAIO.memoryAddr); + stopReason = StrFormat("HDD DMA from I/O memory at " CHC_ARG_SEP "$" CHC_ADDRESS "%04X ", g_DebugBreakOnDMAIO.memoryAddr); else if (g_bDebugBreakpointHit & (BP_DMA_FROM_MEM | BP_DMA_TO_MEM)) skipStopReason = true; @@ -8726,9 +8726,9 @@ void DebugContinueStepping (const bool bCallerWillUpdateDisplay/*=false*/) if (nDebugBreakpointHit) { if (nDebugBreakpointHit & BP_DMA_TO_MEM) - stopReason = StrFormat("HDD DMA to memory $%04X-%04X (breakpoint %s#%s%d%s)", g_DebugBreakOnDMA[i].memoryAddr, g_DebugBreakOnDMA[i].memoryAddrEnd, CHC_ARG_SEP, CHC_NUM_HEX, g_DebugBreakOnDMA[i].BPid, CHC_DEFAULT); + stopReason = StrFormat("HDD DMA to memory " CHC_ARG_SEP "$" CHC_ADDRESS "%04X" CHC_ARG_SEP "-" CHC_ADDRESS "%04X" CHC_DEFAULT " (breakpoint %s#%s%d%s)", g_DebugBreakOnDMA[i].memoryAddr, g_DebugBreakOnDMA[i].memoryAddrEnd, CHC_ARG_SEP, CHC_NUM_HEX, g_DebugBreakOnDMA[i].BPid, CHC_DEFAULT); else if (nDebugBreakpointHit & BP_DMA_FROM_MEM) - stopReason = StrFormat("HDD DMA from memory $%04X-%04X (breakpoint %s#%s%d%s)", g_DebugBreakOnDMA[i].memoryAddr, g_DebugBreakOnDMA[i].memoryAddrEnd, CHC_ARG_SEP, CHC_NUM_HEX, g_DebugBreakOnDMA[i].BPid, CHC_DEFAULT); + stopReason = StrFormat("HDD DMA from memory " CHC_ARG_SEP "$" CHC_ADDRESS "%04X" CHC_ARG_SEP "-" CHC_ADDRESS "%04X" CHC_DEFAULT " (breakpoint %s#%s%d%s)", g_DebugBreakOnDMA[i].memoryAddr, g_DebugBreakOnDMA[i].memoryAddrEnd, CHC_ARG_SEP, CHC_NUM_HEX, g_DebugBreakOnDMA[i].BPid, CHC_DEFAULT); ConsolePrintFormat( CHC_INFO "Stop reason: " CHC_DEFAULT "%s", stopReason.c_str() ); } }