[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 18/21] exec/gdbstub: Make gdb_exit() / gdb_set_stop_cpu() targ
|
From: |
Philippe Mathieu-Daudé |
|
Subject: |
[PATCH v3 18/21] exec/gdbstub: Make gdb_exit() / gdb_set_stop_cpu() target agnostic |
|
Date: |
Mon, 7 Feb 2022 08:54:23 +0100 |
gdb_exit() and gdb_set_stop_cpu() prototypes don't have to be
target specific. Remove this limitation to be able to build
softmmu/cpus.c and softmmu/runstate.c once for all targets.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/exec/gdbstub.h | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h
index a024a0350d..89edf94d28 100644
--- a/include/exec/gdbstub.h
+++ b/include/exec/gdbstub.h
@@ -45,17 +45,6 @@ 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);
-
-/**
- * gdb_exit: exit gdb session, reporting inferior status
- * @code: exit code reported
- *
- * This closes the session and sends a final packet to GDB reporting
- * the exit status of the program. It also cleans up any connections
- * detritus before returning.
- */
-void gdb_exit(int code);
#ifdef CONFIG_USER_ONLY
/**
@@ -165,7 +154,7 @@ static inline uint8_t * gdb_get_reg_ptr(GByteArray *buf,
int len)
#define ldtul_p(addr) ldl_p(addr)
#endif
-#endif
+#endif /* NEED_CPU_H */
/**
* gdbserver_start: start the gdb server
@@ -177,6 +166,18 @@ static inline uint8_t * gdb_get_reg_ptr(GByteArray *buf,
int len)
*/
int gdbserver_start(const char *port_or_device);
+/**
+ * gdb_exit: exit gdb session, reporting inferior status
+ * @code: exit code reported
+ *
+ * This closes the session and sends a final packet to GDB reporting
+ * the exit status of the program. It also cleans up any connections
+ * detritus before returning.
+ */
+void gdb_exit(int code);
+
+void gdb_set_stop_cpu(CPUState *cpu);
+
/**
* gdb_has_xml:
* This is an ugly hack to cope with both new and old gdb.
--
2.34.1
- [PATCH v3 07/21] accel/kvm: Simplify user-mode #ifdef'ry, (continued)
- [PATCH v3 07/21] accel/kvm: Simplify user-mode #ifdef'ry, Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 08/21] accel/hax: Introduce CONFIG_HAX_IS_POSSIBLE, Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 10/21] accel: Introduce AccelOpsClass::cpu_thread_is_idle(), Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 15/21] softmmu/cpu-timers: Remove unused 'exec/exec-all.h' header, Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 21/21] softmmu: Build target-agnostic objects once, Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 13/21] softmmu/runstate: Clean headers, Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 16/21] misc: Remove unnecessary "sysemu/cpu-timers.h" include, Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 17/21] misc: Add missing "sysemu/cpu-timers.h" include, Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 20/21] softmmu: Add qemu_init_arch_modules(), Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 09/21] softmmu/cpus: Code movement, Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 18/21] exec/gdbstub: Make gdb_exit() / gdb_set_stop_cpu() target agnostic,
Philippe Mathieu-Daudé <=
- [PATCH v3 05/21] sysemu/memory_mapping: Become target-agnostic, Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 14/21] softmmu/physmem: Remove unnecessary include, Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 12/21] softmmu/globals: Remove unused 'hw/i386/*' headers, Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 19/21] exec/cpu: Make address_space_init/reloading_memory_map target agnostic, Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 11/21] accel: Introduce AccelOpsClass::cpus_are_resettable(), Philippe Mathieu-Daudé, 2022/02/07