summaryrefslogtreecommitdiffstats
path: root/remote.c
diff options
context:
space:
mode:
authorJiri Gaisler <jiri@gaisler.se>2019-11-04 22:57:29 +0100
committerJiri Gaisler <jiri@gaisler.se>2019-11-08 22:33:05 +0100
commit88b545002e553f1e21fab1aff854a3e325976ad3 (patch)
tree45aaddcb10ccc2d17706e2fee31d367042bbd2f0 /remote.c
parentRelease version 2.18 (diff)
downloadsis-88b545002e553f1e21fab1aff854a3e325976ad3.tar.bz2
Improve gdb watchpoint handling
* show old/new values * stop at correct instruction
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/remote.c b/remote.c
index 95e1a32..2587750 100644
--- a/remote.c
+++ b/remote.c
@@ -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 */