aboutsummaryrefslogtreecommitdiff
path: root/include/exec/gdbstub.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-09-07 10:39:27 +0100
committerPeter Maydell <peter.maydell@linaro.org>2015-09-07 10:39:27 +0100
commit19239b39e7501dedec8d92f0eca79c187685bcce (patch)
tree9e4d61cf5c84b40e1ba0833cf3ff115a46287faa /include/exec/gdbstub.h
parent205ace55ffff77964e50af08c99639ec47db53f6 (diff)
gdbstub: Implement gdb_do_syscallv()
Implement a variant of the existing gdb_do_syscall() which takes a va_list. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Christopher Covington <cov@codeaurora.org> Message-id: 1439483745-28752-4-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'include/exec/gdbstub.h')
-rw-r--r--include/exec/gdbstub.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h
index 05f57c2432..d9e8cf7715 100644
--- a/include/exec/gdbstub.h
+++ b/include/exec/gdbstub.h
@@ -14,7 +14,34 @@
typedef void (*gdb_syscall_complete_cb)(CPUState *cpu,
target_ulong ret, target_ulong err);
+/**
+ * gdb_do_syscall:
+ * @cb: function to call when the system call has completed
+ * @fmt: gdb syscall format string
+ * ...: list of arguments to interpolate into @fmt
+ *
+ * Send a GDB syscall request. This function will return immediately;
+ * the callback function will be called later when the remote system
+ * call has completed.
+ *
+ * @fmt should be in the 'call-id,parameter,parameter...' format documented
+ * for the F request packet in the GDB remote protocol. A limited set of
+ * printf-style format specifiers is supported:
+ * %x - target_ulong argument printed in hex
+ * %lx - 64-bit argument printed in hex
+ * %s - string pointer (target_ulong) and length (int) pair
+ */
void gdb_do_syscall(gdb_syscall_complete_cb cb, const char *fmt, ...);
+/**
+ * gdb_do_syscallv:
+ * @cb: function to call when the system call has completed
+ * @fmt: gdb syscall format string
+ * @va: arguments to interpolate into @fmt
+ *
+ * As gdb_do_syscall, but taking a va_list rather than a variable
+ * argument list.
+ */
+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);
void gdb_exit(CPUArchState *, int);