From 3e7a7092d47ceca874166839d6e88439c911f452 Mon Sep 17 00:00:00 2001 From: Tomas Vanek Date: Sun, 2 Nov 2025 07:52:02 +0100 Subject: [PATCH] target/arm_dpm: report vector catch as breakpoint Commit 4afa32ece148 ("aarch64: unify armv7-a and armv8 debug entry decoding") probably unintentionally removed DSCR_ENTRY_VECT_CATCH from reported debug entry reasons. Note the discrepancy between 'case DSCR_ENTRY_BKPT_INSTR:' and its comment. Hitting vector catch was reported as DBG_REASON_UNDEFINED. DBG_REASON_UNDEFINED disturbed hwthread/gdb cooperation and gdb reported the wrong thread as stopped by SIGTRAP. Revert to the original functionality and report vector catch as a breakpoint. Change-Id: I12e938182cff8f633decba340000cfbb7b112ae3 Signed-off-by: Tomas Vanek Reviewed-on: https://review.openocd.org/c/openocd/+/9209 Tested-by: jenkins Reviewed-by: Antonio Borneo --- src/target/arm_dpm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/target/arm_dpm.c b/src/target/arm_dpm.c index 26e32591a..63c41c583 100644 --- a/src/target/arm_dpm.c +++ b/src/target/arm_dpm.c @@ -1064,7 +1064,8 @@ void arm_dpm_report_dscr(struct arm_dpm *dpm, uint32_t dscr) target->debug_reason = DBG_REASON_DBGRQ; break; case DSCR_ENTRY_BREAKPOINT: /* HW breakpoint */ - case DSCR_ENTRY_BKPT_INSTR: /* vector catch */ + case DSCR_ENTRY_BKPT_INSTR: /* SW BKPT */ + case DSCR_ENTRY_VECT_CATCH: /* vector catch */ target->debug_reason = DBG_REASON_BREAKPOINT; break; case DSCR_ENTRY_IMPRECISE_WATCHPT: /* asynch watchpoint */