]> Git Repo - qemu.git/commitdiff
gdbstub: drop CPUEnv from gdb_exit()
authorAlex Bennée <[email protected]>
Fri, 8 Jan 2021 22:42:43 +0000 (22:42 +0000)
committerAlex Bennée <[email protected]>
Mon, 18 Jan 2021 10:05:06 +0000 (10:05 +0000)
gdb_exit() has never needed anything from env and I doubt we are going
to start now.

Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Reviewed-by: Laurent Vivier <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <20210108224256[email protected]>

bsd-user/syscall.c
gdbstub.c
include/exec/gdbstub.h
linux-user/exit.c
target/arm/arm-semi.c
target/m68k/m68k-semi.c
target/nios2/nios2-semi.c

index d38ec7a1622a51c1d573cfb65fede411818a4da8..adc3d21b542939a8f6528c1b3976334692f4512b 100644 (file)
@@ -333,7 +333,7 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1,
 #ifdef CONFIG_GPROF
         _mcleanup();
 #endif
-        gdb_exit(cpu_env, arg1);
+        gdb_exit(arg1);
         qemu_plugin_atexit_cb();
         /* XXX: should free thread stack and CPU env */
         _exit(arg1);
@@ -435,7 +435,7 @@ abi_long do_netbsd_syscall(void *cpu_env, int num, abi_long arg1,
 #ifdef CONFIG_GPROF
         _mcleanup();
 #endif
-        gdb_exit(cpu_env, arg1);
+        gdb_exit(arg1);
         qemu_plugin_atexit_cb();
         /* XXX: should free thread stack and CPU env */
         _exit(arg1);
@@ -514,7 +514,7 @@ abi_long do_openbsd_syscall(void *cpu_env, int num, abi_long arg1,
 #ifdef CONFIG_GPROF
         _mcleanup();
 #endif
-        gdb_exit(cpu_env, arg1);
+        gdb_exit(arg1);
         qemu_plugin_atexit_cb();
         /* XXX: should free thread stack and CPU env */
         _exit(arg1);
index aeffdaf06fc81798d699bd2329e102d9d0fa2717..a4718d43734fbd73af3b7d3d287a898e79e5e26f 100644 (file)
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -3068,7 +3068,7 @@ static void gdb_read_byte(uint8_t ch)
 }
 
 /* Tell the remote gdb that the process has exited.  */
-void gdb_exit(CPUArchState *env, int code)
+void gdb_exit(int code)
 {
   char buf[4];
 
index 94d8f83e92daddb2591d7c8244eb3175da8e5a37..492db0f51295f044da6957dd94ab30f118dd571b 100644 (file)
@@ -46,7 +46,7 @@ void gdb_do_syscall(gdb_syscall_complete_cb cb, const char *fmt, ...);
 void gdb_do_syscallv(gdb_syscall_complete_cb cb, const char *fmt, va_list va);
 int use_gdb_syscalls(void);
 void gdb_set_stop_cpu(CPUState *cpu);
-void gdb_exit(CPUArchState *, int);
+void gdb_exit(int);
 #ifdef CONFIG_USER_ONLY
 /**
  * gdb_handlesig: yield control to gdb
index 159401544452371033a30cb4d1bb007c29e4e5e1..70b344048c0cccc1ea4063d31aee61dde77d9a68 100644 (file)
@@ -34,6 +34,6 @@ void preexit_cleanup(CPUArchState *env, int code)
 #ifdef CONFIG_GCOV
         __gcov_dump();
 #endif
-        gdb_exit(env, code);
+        gdb_exit(code);
         qemu_plugin_atexit_cb();
 }
index f7b7bff522852e94d001cd3fc725b1689b7bebed..93360e28c7ee44874ce4048ec85c984f45c941da 100644 (file)
@@ -1101,7 +1101,7 @@ target_ulong do_arm_semihosting(CPUARMState *env)
              */
             ret = (args == ADP_Stopped_ApplicationExit) ? 0 : 1;
         }
-        gdb_exit(env, ret);
+        gdb_exit(ret);
         exit(ret);
     case TARGET_SYS_SYNCCACHE:
         /*
index 27600e0cc0ae74fa7c81c2802ba85d2027310b03..d919245e4f85221f8af6e1605e6c06bea82be545 100644 (file)
@@ -195,7 +195,7 @@ void do_m68k_semihosting(CPUM68KState *env, int nr)
     args = env->dregs[1];
     switch (nr) {
     case HOSTED_EXIT:
-        gdb_exit(env, env->dregs[0]);
+        gdb_exit(env->dregs[0]);
         exit(env->dregs[0]);
     case HOSTED_OPEN:
         GET_ARG(0);
index d7a80dd303a9096cb4c33a1af16051b531988c96..e508b2fafcebd898722ce9ef56acea9201afe95b 100644 (file)
@@ -215,7 +215,7 @@ void do_nios2_semihosting(CPUNios2State *env)
     args = env->regs[R_ARG1];
     switch (nr) {
     case HOSTED_EXIT:
-        gdb_exit(env, env->regs[R_ARG0]);
+        gdb_exit(env->regs[R_ARG0]);
         exit(env->regs[R_ARG0]);
     case HOSTED_OPEN:
         GET_ARG(0);
This page took 0.049608 seconds and 4 git commands to generate.