aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbserver/server.c')
-rw-r--r--gdb/gdbserver/server.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index c781552..a03f877 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -2456,15 +2456,25 @@ process_serial_event (void)
}
break;
case 'g':
- require_running (own_buf);
- set_desired_inferior (1);
- registers_to_string (own_buf);
+ {
+ struct regcache *regcache;
+
+ require_running (own_buf);
+ set_desired_inferior (1);
+ regcache = get_thread_regcache (current_inferior, 1);
+ registers_to_string (regcache, own_buf);
+ }
break;
case 'G':
- require_running (own_buf);
- set_desired_inferior (1);
- registers_from_string (&own_buf[1]);
- write_ok (own_buf);
+ {
+ struct regcache *regcache;
+
+ require_running (own_buf);
+ set_desired_inferior (1);
+ regcache = get_thread_regcache (current_inferior, 1);
+ registers_from_string (regcache, &own_buf[1]);
+ write_ok (own_buf);
+ }
break;
case 'm':
require_running (own_buf);