From c224bdbf44ad44ef5d762a93c381103bb293dec4 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Thu, 6 Sep 2018 18:56:59 +0300 Subject: [PATCH] f-only debugger breakpoint fixed. (break when CPU executes instruction in RAM) --- debug.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/debug.cpp b/debug.cpp index 51951161..4f8f6077 100644 --- a/debug.cpp +++ b/debug.cpp @@ -53,6 +53,7 @@ #define TRACE_MATCH_INS 3 #define TRACE_RANGE_PC 4 #define TRACE_SKIP_LINE 5 +#define TRACE_RAM_PC 6 #define TRACE_CHECKONLY 10 static int trace_mode; @@ -4590,7 +4591,7 @@ int instruction_breakpoint (TCHAR **c) return 0; } } - trace_mode = TRACE_CHECKONLY; + trace_mode = TRACE_RAM_PC; return 1; } @@ -5982,6 +5983,16 @@ void debug (void) if (trace_mode) { if (trace_mode == TRACE_MATCH_PC && trace_param1 == pc) bp = -1; + if (trace_mode == TRACE_RAM_PC) { + addrbank *ab = &get_mem_bank(pc); + if (ab->flags & ABFLAG_RAM) { + uae_u16 ins = get_word_debug(pc); + // skip JMP xxxxxx (LVOs) + if (ins != 0x4ef9) { + bp = -1; + } + } + } if ((processptr || processname) && notinrom()) { uaecptr execbase = get_long_debug (4); uaecptr activetask = get_long_debug (execbase + 276); -- 2.47.3