From f7ec7f7b269813603b1d64bb9833f9e711f0115c Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Tue, 23 Jun 2015 19:31:16 -0700 Subject: gdbstub: Change gdbserver_fork() to accept cpu instead of env MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All callsites to this function navigate the cpu->env_ptr only for the function to take the env ptr back to the original cpu ptr. Change the function to just pass in the CPU pointer instead. Removes a core code usage of ENV_GET_CPU() (in gdbstub.c). Cc: Riku Voipio Reviewed-by: Andreas Färber Reviewed-by: Eduardo Habkost Signed-off-by: Peter Crosthwaite Signed-off-by: Andreas Färber --- gdbstub.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gdbstub.c') diff --git a/gdbstub.c b/gdbstub.c index 0fa8dd8352..aa5ba5174d 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1629,9 +1629,8 @@ int gdbserver_start(int port) } /* Disable gdb stub for child processes. */ -void gdbserver_fork(CPUArchState *env) +void gdbserver_fork(CPUState *cpu) { - CPUState *cpu = ENV_GET_CPU(env); GDBState *s = gdbserver_state; if (gdbserver_fd < 0 || s->fd < 0) { -- cgit v1.2.3