summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wucher <thomas.wucher@gtd-gmbh.de>2023-04-19 12:14:05 +0200
committerJiri Gaisler <jiri@gaisler.se>2023-04-25 20:35:42 +0200
commit2d01c2b1d3915aa7c0aef7728cd64ff7fdd979d5 (patch)
tree17ce062678df62467523844cc69b10840c23bf75
parentBumped version to 2.30 (diff)
downloadsis-2d01c2b1d3915aa7c0aef7728cd64ff7fdd979d5.tar.bz2
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.
-rw-r--r--interf.c1
1 files changed, 1 insertions, 0 deletions
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;