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 --- linux-user/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux-user') diff --git a/linux-user/main.c b/linux-user/main.c index 6c5c2effbf..2b4b276356 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -130,7 +130,7 @@ void fork_end(int child) pthread_cond_init(&exclusive_cond, NULL); pthread_cond_init(&exclusive_resume, NULL); pthread_mutex_init(&tcg_ctx.tb_ctx.tb_lock, NULL); - gdbserver_fork((CPUArchState *)thread_cpu->env_ptr); + gdbserver_fork(thread_cpu); } else { pthread_mutex_unlock(&exclusive_lock); pthread_mutex_unlock(&tcg_ctx.tb_ctx.tb_lock); -- cgit v1.2.1