diff options
author | Jiri Gaisler <jiri@gaisler.se> | 2019-11-04 22:57:29 +0100 |
---|---|---|
committer | Jiri Gaisler <jiri@gaisler.se> | 2019-11-08 22:33:05 +0100 |
commit | 88b545002e553f1e21fab1aff854a3e325976ad3 (patch) | |
tree | 45aaddcb10ccc2d17706e2fee31d367042bbd2f0 /sparc.c | |
parent | Release version 2.18 (diff) | |
download | sis-88b545002e553f1e21fab1aff854a3e325976ad3.tar.bz2 |
Improve gdb watchpoint handling
* show old/new values
* stop at correct instruction
Diffstat (limited to 'sparc.c')
-rw-r--r-- | sparc.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -961,12 +961,23 @@ sparc_dispatch_instruction (sregs) if (op3 & 4) { sregs->icnt = T_ST; /* Set store instruction count */ + + /* skip store if we resume after a write watchpoint */ + if (sis_gdb_break && ebase.wphit) + { + ebase.wphit = 0; + break; + } + if (ebase.wpwnum) { if ((ebase.wphit = check_wpw (sregs, address, wpmask (op3)))) { sregs->trap = WPT_TRAP; - break; + /* gdb seems to expect that the write goes trough when the + * watchpoint is hit, but PC stays on the store instruction */ + if (!sis_gdb_break) + break; } } #if defined(STAT) || defined(ENABLE_L1CACHE) |