aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi/mi-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/mi/mi-main.c')
-rw-r--r--gdb/mi/mi-main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 944c911..abcd0d3 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -1132,7 +1132,6 @@ void
mi_cmd_data_write_register_values (const char *command,
const char *const *argv, int argc)
{
- struct regcache *regcache;
struct gdbarch *gdbarch;
int numregs, i;
@@ -1143,7 +1142,7 @@ mi_cmd_data_write_register_values (const char *command,
will change depending upon the particular processor being
debugged. */
- regcache = get_current_regcache ();
+ regcache *regcache = get_thread_regcache (inferior_thread ());
gdbarch = regcache->arch ();
numregs = gdbarch_num_cooked_regs (gdbarch);