diff mbox

[qom-cpu,21/59] gdbstub: Set gdb_set_stop_cpu() argument to CPUState

Message ID 1370805206-26574-22-git-send-email-afaerber@suse.de
State New
Headers show

Commit Message

Andreas Färber June 9, 2013, 7:12 p.m. UTC
Use CPUState::env_ptr for now.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 cpus.c                 | 2 +-
 gdbstub.c              | 4 +++-
 include/exec/gdbstub.h | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/cpus.c b/cpus.c
index f07618f..dba69bc 100644
--- a/cpus.c
+++ b/cpus.c
@@ -467,7 +467,7 @@  static void cpu_handle_guest_debug(CPUArchState *env)
 {
     CPUState *cpu = ENV_GET_CPU(env);
 
-    gdb_set_stop_cpu(env);
+    gdb_set_stop_cpu(cpu);
     qemu_system_debug_request();
     cpu->stopped = true;
 }
diff --git a/gdbstub.c b/gdbstub.c
index 7744456..1bee3dc 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -2503,8 +2503,10 @@  static int gdb_handle_packet(GDBState *s, const char *line_buf)
     return RS_IDLE;
 }
 
-void gdb_set_stop_cpu(CPUArchState *env)
+void gdb_set_stop_cpu(CPUState *cpu)
 {
+    CPUArchState *env = cpu->env_ptr;
+
     gdbserver_state->c_cpu = env;
     gdbserver_state->g_cpu = env;
 }
diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h
index ba20afa..ded4160 100644
--- a/include/exec/gdbstub.h
+++ b/include/exec/gdbstub.h
@@ -16,7 +16,7 @@  typedef void (*gdb_syscall_complete_cb)(CPUArchState *env,
 
 void gdb_do_syscall(gdb_syscall_complete_cb cb, const char *fmt, ...);
 int use_gdb_syscalls(void);
-void gdb_set_stop_cpu(CPUArchState *env);
+void gdb_set_stop_cpu(CPUState *cpu);
 void gdb_exit(CPUArchState *, int);
 #ifdef CONFIG_USER_ONLY
 int gdb_queuesig (void);