[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 28/30] stubs: split semihosting_get_target from system only stubs
From: |
Alex Bennée |
Subject: |
[PULL 28/30] stubs: split semihosting_get_target from system only stubs |
Date: |
Tue, 7 Mar 2023 21:21:37 +0000 |
As we are about to have a common syscalls.c for gdbstub we need to
stub out one semihosting helper function for all targets.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230307170405.796822-1-alex.bennee@linaro.org>
diff --git a/stubs/semihost-all.c b/stubs/semihost-all.c
new file mode 100644
index 0000000000..a2a1fc9c6f
--- /dev/null
+++ b/stubs/semihost-all.c
@@ -0,0 +1,17 @@
+/*
+ * Semihosting Stubs for all targets
+ *
+ * Copyright (c) 2023 Linaro Ltd
+ *
+ * Stubs for all targets that don't actually do semihosting.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "qemu/osdep.h"
+#include "semihosting/semihost.h"
+
+SemihostingTarget semihosting_get_target(void)
+{
+ return SEMIHOSTING_TARGET_AUTO;
+}
diff --git a/stubs/semihost.c b/stubs/semihost.c
index d65c9fd5dc..aad7a70353 100644
--- a/stubs/semihost.c
+++ b/stubs/semihost.c
@@ -28,11 +28,6 @@ bool semihosting_enabled(bool is_user)
return false;
}
-SemihostingTarget semihosting_get_target(void)
-{
- return SEMIHOSTING_TARGET_AUTO;
-}
-
/*
* All the rest are empty subs. We could g_assert_not_reached() but
* that adds extra weight to the final binary. Waste not want not.
diff --git a/stubs/meson.build b/stubs/meson.build
index 7657467a5d..b2b5956d97 100644
--- a/stubs/meson.build
+++ b/stubs/meson.build
@@ -61,4 +61,5 @@ if have_system
else
stub_ss.add(files('qdev.c'))
endif
+stub_ss.add(files('semihost-all.c'))
stub_ss.add(when: 'CONFIG_VFIO_USER_SERVER', if_false:
files('vfio-user-obj.c'))
--
2.39.2
- [PULL 14/30] gdbstub: specialise handle_query_attached, (continued)
- [PULL 14/30] gdbstub: specialise handle_query_attached, Alex Bennée, 2023/03/07
- [PULL 12/30] gdbstub: rationalise signal mapping in softmmu, Alex Bennée, 2023/03/07
- [PULL 09/30] gdbstub: make various helpers visible to the rest of the module, Alex Bennée, 2023/03/07
- [PULL 11/30] gdbstub: move chunks of user code into own files, Alex Bennée, 2023/03/07
- [PULL 02/30] gdbstub: fix-up copyright and license files, Alex Bennée, 2023/03/07
- [PULL 06/30] gdbstub: move GDBState to shared internals header, Alex Bennée, 2023/03/07
- [PULL 13/30] gdbstub: abstract target specific details from gdb_put_packet_binary, Alex Bennée, 2023/03/07
- [PULL 17/30] gdbstub: specialise stub_can_reverse, Alex Bennée, 2023/03/07
- [PULL 26/30] gdbstub: Remove gdb_do_syscallv, Alex Bennée, 2023/03/07
- [PULL 29/30] gdbstub: Build syscall.c once, Alex Bennée, 2023/03/07
- [PULL 28/30] stubs: split semihosting_get_target from system only stubs,
Alex Bennée <=
- [PULL 16/30] gdbstub: introduce gdb_get_max_cpus, Alex Bennée, 2023/03/07
- [PULL 25/30] gdbstub: split out softmmu/user specifics for syscall handling, Alex Bennée, 2023/03/07
- [PULL 30/30] gdbstub: move update guest debug to accel ops, Alex Bennée, 2023/03/07
- [PULL 27/30] gdbstub: Adjust gdb_do_syscall to only use uint32_t and uint64_t, Alex Bennée, 2023/03/07
- [PULL 19/30] gdbstub: don't use target_ulong while handling registers, Alex Bennée, 2023/03/07
- [PULL 15/30] gdbstub: specialise target_memory_rw_debug, Alex Bennée, 2023/03/07
- [PULL 20/30] gdbstub: move register helpers into standalone include, Alex Bennée, 2023/03/07
- [PULL 24/30] include: split target_long definition from cpu-defs, Alex Bennée, 2023/03/07
- [PULL 18/30] gdbstub: fix address type of gdb_set_cpu_pc, Alex Bennée, 2023/03/07
- [PULL 23/30] testing: probe gdb for supported architectures ahead of time, Alex Bennée, 2023/03/07