فهرست منبع

gdbstub: drop CPUEnv from gdb_exit()

gdb_exit() has never needed anything from env and I doubt we are going
to start now.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210108224256.2321-8-alex.bennee@linaro.org>
Alex Bennée 4 سال پیش
والد
کامیت
ad9dcb207b
7فایلهای تغییر یافته به همراه9 افزوده شده و 9 حذف شده
  1. 3 3
      bsd-user/syscall.c
  2. 1 1
      gdbstub.c
  3. 1 1
      include/exec/gdbstub.h
  4. 1 1
      linux-user/exit.c
  5. 1 1
      target/arm/arm-semi.c
  6. 1 1
      target/m68k/m68k-semi.c
  7. 1 1
      target/nios2/nios2-semi.c

+ 3 - 3
bsd-user/syscall.c

@@ -333,7 +333,7 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1,
 #ifdef CONFIG_GPROF
 #ifdef CONFIG_GPROF
         _mcleanup();
         _mcleanup();
 #endif
 #endif
-        gdb_exit(cpu_env, arg1);
+        gdb_exit(arg1);
         qemu_plugin_atexit_cb();
         qemu_plugin_atexit_cb();
         /* XXX: should free thread stack and CPU env */
         /* XXX: should free thread stack and CPU env */
         _exit(arg1);
         _exit(arg1);
@@ -435,7 +435,7 @@ abi_long do_netbsd_syscall(void *cpu_env, int num, abi_long arg1,
 #ifdef CONFIG_GPROF
 #ifdef CONFIG_GPROF
         _mcleanup();
         _mcleanup();
 #endif
 #endif
-        gdb_exit(cpu_env, arg1);
+        gdb_exit(arg1);
         qemu_plugin_atexit_cb();
         qemu_plugin_atexit_cb();
         /* XXX: should free thread stack and CPU env */
         /* XXX: should free thread stack and CPU env */
         _exit(arg1);
         _exit(arg1);
@@ -514,7 +514,7 @@ abi_long do_openbsd_syscall(void *cpu_env, int num, abi_long arg1,
 #ifdef CONFIG_GPROF
 #ifdef CONFIG_GPROF
         _mcleanup();
         _mcleanup();
 #endif
 #endif
-        gdb_exit(cpu_env, arg1);
+        gdb_exit(arg1);
         qemu_plugin_atexit_cb();
         qemu_plugin_atexit_cb();
         /* XXX: should free thread stack and CPU env */
         /* XXX: should free thread stack and CPU env */
         _exit(arg1);
         _exit(arg1);

+ 1 - 1
gdbstub.c

@@ -3068,7 +3068,7 @@ static void gdb_read_byte(uint8_t ch)
 }
 }
 
 
 /* Tell the remote gdb that the process has exited.  */
 /* Tell the remote gdb that the process has exited.  */
-void gdb_exit(CPUArchState *env, int code)
+void gdb_exit(int code)
 {
 {
   char buf[4];
   char buf[4];
 
 

+ 1 - 1
include/exec/gdbstub.h

@@ -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);
 void gdb_do_syscallv(gdb_syscall_complete_cb cb, const char *fmt, va_list va);
 int use_gdb_syscalls(void);
 int use_gdb_syscalls(void);
 void gdb_set_stop_cpu(CPUState *cpu);
 void gdb_set_stop_cpu(CPUState *cpu);
-void gdb_exit(CPUArchState *, int);
+void gdb_exit(int);
 #ifdef CONFIG_USER_ONLY
 #ifdef CONFIG_USER_ONLY
 /**
 /**
  * gdb_handlesig: yield control to gdb
  * gdb_handlesig: yield control to gdb

+ 1 - 1
linux-user/exit.c

@@ -34,6 +34,6 @@ void preexit_cleanup(CPUArchState *env, int code)
 #ifdef CONFIG_GCOV
 #ifdef CONFIG_GCOV
         __gcov_dump();
         __gcov_dump();
 #endif
 #endif
-        gdb_exit(env, code);
+        gdb_exit(code);
         qemu_plugin_atexit_cb();
         qemu_plugin_atexit_cb();
 }
 }

+ 1 - 1
target/arm/arm-semi.c

@@ -1101,7 +1101,7 @@ target_ulong do_arm_semihosting(CPUARMState *env)
              */
              */
             ret = (args == ADP_Stopped_ApplicationExit) ? 0 : 1;
             ret = (args == ADP_Stopped_ApplicationExit) ? 0 : 1;
         }
         }
-        gdb_exit(env, ret);
+        gdb_exit(ret);
         exit(ret);
         exit(ret);
     case TARGET_SYS_SYNCCACHE:
     case TARGET_SYS_SYNCCACHE:
         /*
         /*

+ 1 - 1
target/m68k/m68k-semi.c

@@ -195,7 +195,7 @@ void do_m68k_semihosting(CPUM68KState *env, int nr)
     args = env->dregs[1];
     args = env->dregs[1];
     switch (nr) {
     switch (nr) {
     case HOSTED_EXIT:
     case HOSTED_EXIT:
-        gdb_exit(env, env->dregs[0]);
+        gdb_exit(env->dregs[0]);
         exit(env->dregs[0]);
         exit(env->dregs[0]);
     case HOSTED_OPEN:
     case HOSTED_OPEN:
         GET_ARG(0);
         GET_ARG(0);

+ 1 - 1
target/nios2/nios2-semi.c

@@ -215,7 +215,7 @@ void do_nios2_semihosting(CPUNios2State *env)
     args = env->regs[R_ARG1];
     args = env->regs[R_ARG1];
     switch (nr) {
     switch (nr) {
     case HOSTED_EXIT:
     case HOSTED_EXIT:
-        gdb_exit(env, env->regs[R_ARG0]);
+        gdb_exit(env->regs[R_ARG0]);
         exit(env->regs[R_ARG0]);
         exit(env->regs[R_ARG0]);
     case HOSTED_OPEN:
     case HOSTED_OPEN:
         GET_ARG(0);
         GET_ARG(0);