From 2d01c2b1d3915aa7c0aef7728cd64ff7fdd979d5 Mon Sep 17 00:00:00 2001 From: Thomas Wucher Date: Wed, 19 Apr 2023 12:14:05 +0200 Subject: Fix removing software breakpoints When a breakpoint is removed, the ebase.bpts array is correctly updated, but ebase.bpsave is not kept in sync. This results in wrong instructions being executed when adding multiple breakpoints and then removing any but the last. Fix this error by updating the ebase.bpsave array when removing a breakpoint. --- interf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/interf.c b/interf.c index edca4e0..522f782 100644 --- a/interf.c +++ b/interf.c @@ -398,6 +398,7 @@ sim_remove_swbreakpoint (uint32 addr, int len) for (; i < ebase.bptnum; i++) { ebase.bpts[i] = ebase.bpts[i + 1]; + ebase.bpsave[i] = ebase.bpsave[i + 1]; } ebase.bptnum -= 1; return 1; -- cgit v1.2.3