Use CPUState::env_ptr for now.
Prepares for changing cpu_handle_guest_debug() argument to CPUState.
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Andreas Färber <afaerber@suse.de>
{
CPUState *cpu = ENV_GET_CPU(env);
- gdb_set_stop_cpu(env);
+ gdb_set_stop_cpu(cpu);
qemu_system_debug_request();
cpu->stopped = true;
}
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;
}
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);