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 /remote.c | |
parent | 4e080cdb1dd910750fb28de1f764934206554301 (diff) |
Improve gdb watchpoint handling
* show old/new values
* stop at correct instruction
Diffstat (limited to 'remote.c')
-rw-r--r-- | remote.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -288,12 +288,14 @@ gdb_remote_exec (char *buf) case 'c': sim_resume (0); i = sim_stat (); - /* The T watch response does not seem to work with sparc/gdb, disable ... - if ((i == SIGTRAP) && ebase.wphit) - sprintf (txbuf, "T%02xwatch:%x;", i, ebase.wpaddress); - else - */ sprintf (txbuf, "S%02x", i); + if ((i == SIGTRAP) && ebase.wphit) + { + if (ebase.wptype == 2) + sprintf (txbuf, "T%02xwatch:%x;", i, ebase.wpaddress); + else if (ebase.wptype == 3) + sprintf (txbuf, "T%02xrwatch:%x;", i, ebase.wpaddress); + } break; case 'k': /* kill */ case 'R': /* restart */ |