diff options
author | Thomas Wucher <thomas.wucher@gtd-gmbh.de> | 2023-04-19 12:14:05 +0200 |
---|---|---|
committer | Jiri Gaisler <jiri@gaisler.se> | 2023-04-25 20:35:42 +0200 |
commit | 2d01c2b1d3915aa7c0aef7728cd64ff7fdd979d5 (patch) | |
tree | 17ce062678df62467523844cc69b10840c23bf75 | |
parent | 59647964630d5c9c4ff6b02d2f544f4a6d6787ec (diff) |
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.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; |