aboutsummaryrefslogtreecommitdiff
path: root/gdbstub
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-03-02 18:58:02 -0800
committerAlex Bennée <alex.bennee@linaro.org>2023-03-07 20:44:09 +0000
commit2f70f2d7917357621fbc4fadeb1bb6f99bd805e0 (patch)
tree554bc44103d0e18f76f111b18d1ee94823719a92 /gdbstub
parent131f387d741ee2dfe953f8829e5634e49e6dfb31 (diff)
downloadqemu-2f70f2d7917357621fbc4fadeb1bb6f99bd805e0.zip
qemu-2f70f2d7917357621fbc4fadeb1bb6f99bd805e0.tar.gz
qemu-2f70f2d7917357621fbc4fadeb1bb6f99bd805e0.tar.bz2
gdbstub: Remove gdb_do_syscallv
This function is unused, except to implement gdb_do_syscall. Fold the implementations together. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230303025805.625589-27-richard.henderson@linaro.org>
Diffstat (limited to 'gdbstub')
-rw-r--r--gdbstub/syscalls.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/gdbstub/syscalls.c b/gdbstub/syscalls.c
index 6189940..fdc68e4 100644
--- a/gdbstub/syscalls.c
+++ b/gdbstub/syscalls.c
@@ -93,24 +93,26 @@ bool gdb_handled_syscall(void)
* %lx - 64-bit argument printed in hex.
* %s - string pointer (target_ulong) and length (int) pair.
*/
-void gdb_do_syscallv(gdb_syscall_complete_cb cb, const char *fmt, va_list va)
+void gdb_do_syscall(gdb_syscall_complete_cb cb, const char *fmt, ...)
{
- char *p;
- char *p_end;
- target_ulong addr;
- uint64_t i64;
+ char *p, *p_end;
+ va_list va;
if (!gdb_attached()) {
return;
}
gdbserver_syscall_state.current_syscall_cb = cb;
+ va_start(va, fmt);
- p = &gdbserver_syscall_state.syscall_buf[0];
- p_end = &gdbserver_syscall_state.syscall_buf[sizeof(gdbserver_syscall_state.syscall_buf)];
+ p = gdbserver_syscall_state.syscall_buf;
+ p_end = p + sizeof(gdbserver_syscall_state.syscall_buf);
*(p++) = 'F';
while (*fmt) {
if (*fmt == '%') {
+ target_ulong addr;
+ uint64_t i64;
+
fmt++;
switch (*fmt++) {
case 'x':
@@ -141,16 +143,8 @@ void gdb_do_syscallv(gdb_syscall_complete_cb cb, const char *fmt, va_list va)
}
*p = 0;
- gdb_syscall_handling(gdbserver_syscall_state.syscall_buf);
-}
-
-void gdb_do_syscall(gdb_syscall_complete_cb cb, const char *fmt, ...)
-{
- va_list va;
-
- va_start(va, fmt);
- gdb_do_syscallv(cb, fmt, va);
va_end(va);
+ gdb_syscall_handling(gdbserver_syscall_state.syscall_buf);
}
/*