summary refs log tree commit diff stats
path: root/gdbstub/syscalls.c
diff options
context:
space:
mode:
authorGustavo Romero <gustavo.romero@linaro.org>2024-07-05 09:40:38 +0100
committerAlex Bennée <alex.bennee@linaro.org>2024-07-05 12:35:01 +0100
commit133f202b19d8332de8d433c627fe6354e2ecf889 (patch)
tree96b1b5022eeec3ecaaa96a0082c6d6b00f02f617 /gdbstub/syscalls.c
parent0ef6b12e5839667fa0cec4f463a95fef77b18fda (diff)
downloadfocaccia-qemu-133f202b19d8332de8d433c627fe6354e2ecf889.tar.gz
focaccia-qemu-133f202b19d8332de8d433c627fe6354e2ecf889.zip
gdbstub: Move GdbCmdParseEntry into a new header file
Move GdbCmdParseEntry and its associated types into a separate header
file to allow the use of GdbCmdParseEntry and other gdbstub command
functions outside of gdbstub.c.

Since GdbCmdParseEntry and get_param are now public, kdoc
GdbCmdParseEntry and rename get_param to gdb_get_cmd_param.

This commit also makes gdb_put_packet public since is used in gdbstub
command handling.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240628050850.536447-3-gustavo.romero@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240705084047.857176-32-alex.bennee@linaro.org>
Diffstat (limited to 'gdbstub/syscalls.c')
-rw-r--r--gdbstub/syscalls.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdbstub/syscalls.c b/gdbstub/syscalls.c
index 02e3a8f74c..4e1295b782 100644
--- a/gdbstub/syscalls.c
+++ b/gdbstub/syscalls.c
@@ -16,6 +16,7 @@
 #include "sysemu/runstate.h"
 #include "gdbstub/user.h"
 #include "gdbstub/syscalls.h"
+#include "gdbstub/commands.h"
 #include "trace.h"
 #include "internals.h"
 
@@ -154,9 +155,9 @@ void gdb_handle_file_io(GArray *params, void *user_ctx)
         uint64_t ret;
         int err;
 
-        ret = get_param(params, 0)->val_ull;
+        ret = gdb_get_cmd_param(params, 0)->val_ull;
         if (params->len >= 2) {
-            err = get_param(params, 1)->val_ull;
+            err = gdb_get_cmd_param(params, 1)->val_ull;
         } else {
             err = 0;
         }
@@ -196,7 +197,7 @@ void gdb_handle_file_io(GArray *params, void *user_ctx)
         gdbserver_syscall_state.current_syscall_cb = NULL;
     }
 
-    if (params->len >= 3 && get_param(params, 2)->opcode == (uint8_t)'C') {
+    if (params->len >= 3 && gdb_get_cmd_param(params, 2)->opcode == (uint8_t)'C') {
         gdb_put_packet("T02");
         return;
     }