]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
gdbstub: Rename back gdb_handlesig
authorGustavo Romero <gustavo.romero@linaro.org>
Sat, 9 Mar 2024 03:08:57 +0000 (03:08 +0000)
committerAlex Bennée <alex.bennee@linaro.org>
Wed, 13 Mar 2024 11:43:52 +0000 (11:43 +0000)
Rename gdb_handlesig_reason back to gdb_handlesig. There is no need to
add a wrapper for gdb_handlesig and rename it when a new parameter is
added.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20240309030901.1726211-2-gustavo.romero@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
gdbstub/user.c
include/gdbstub/user.h
linux-user/main.c
linux-user/signal.c

index 7f9f19a1249908d4b8a359afb14aeaa2a0f929ea..520987fddc8f1d4fc826660af6ce4e99d01aa344 100644 (file)
@@ -190,7 +190,7 @@ void gdb_qemu_exit(int code)
     exit(code);
 }
 
-int gdb_handlesig_reason(CPUState *cpu, int sig, const char *reason)
+int gdb_handlesig(CPUState *cpu, int sig, const char *reason)
 {
     char buf[256];
     int n;
@@ -746,7 +746,7 @@ void gdb_breakpoint_remove_all(CPUState *cs)
 void gdb_syscall_handling(const char *syscall_packet)
 {
     gdb_put_packet(syscall_packet);
-    gdb_handlesig(gdbserver_state.c_cpu, 0);
+    gdb_handlesig(gdbserver_state.c_cpu, 0, NULL);
 }
 
 static bool should_catch_syscall(int num)
@@ -764,7 +764,7 @@ void gdb_syscall_entry(CPUState *cs, int num)
 {
     if (should_catch_syscall(num)) {
         g_autofree char *reason = g_strdup_printf("syscall_entry:%x;", num);
-        gdb_handlesig_reason(cs, gdb_target_sigtrap(), reason);
+        gdb_handlesig(cs, gdb_target_sigtrap(), reason);
     }
 }
 
@@ -772,7 +772,7 @@ void gdb_syscall_return(CPUState *cs, int num)
 {
     if (should_catch_syscall(num)) {
         g_autofree char *reason = g_strdup_printf("syscall_return:%x;", num);
-        gdb_handlesig_reason(cs, gdb_target_sigtrap(), reason);
+        gdb_handlesig(cs, gdb_target_sigtrap(), reason);
     }
 }
 
index 4c4e5c4c5828e45f2bc859bd17b7dde0da591f3e..4fc88f8a255fa1f94ea6c2bf57f41ea00a74bba2 100644 (file)
@@ -10,7 +10,7 @@
 #define GDBSTUB_USER_H
 
 /**
- * gdb_handlesig_reason() - yield control to gdb
+ * gdb_handlesig() - yield control to gdb
  * @cpu: CPU
  * @sig: if non-zero, the signal number which caused us to stop
  * @reason: stop reason for stop reply packet or NULL
  * or 0 if no signal should be delivered, ie the signal that caused
  * us to stop should be ignored.
  */
-int gdb_handlesig_reason(CPUState *, int, const char *);
-
-/**
- * gdb_handlesig() - yield control to gdb
- * @cpu CPU
- * @sig: if non-zero, the signal number which caused us to stop
- * @see gdb_handlesig_reason()
- */
-static inline int gdb_handlesig(CPUState *cpu, int sig)
-{
-    return gdb_handlesig_reason(cpu, sig, NULL);
-}
+int gdb_handlesig(CPUState *, int, const char *);
 
 /**
  * gdb_signalled() - inform remote gdb of sig exit
index 41caa77cb5271d309ff13dc6c3925a9ecc59564e..55aa11c9b465da0534e629030908e00c6e0717e4 100644 (file)
@@ -1018,7 +1018,7 @@ int main(int argc, char **argv, char **envp)
                     gdbstub);
             exit(EXIT_FAILURE);
         }
-        gdb_handlesig(cpu, 0);
+        gdb_handlesig(cpu, 0, NULL);
     }
 
 #ifdef CONFIG_SEMIHOSTING
index 1aebf3fc47ab6534ea8dd06383cc3cd962043e07..b705625cbd338077a14a5e6c067f073a61a9c67d 100644 (file)
@@ -1178,7 +1178,7 @@ static void handle_pending_signal(CPUArchState *cpu_env, int sig,
     /* dequeue signal */
     k->pending = 0;
 
-    sig = gdb_handlesig(cpu, sig);
+    sig = gdb_handlesig(cpu, sig, NULL);
     if (!sig) {
         sa = NULL;
         handler = TARGET_SIG_IGN;