diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2024-02-07 16:38:10 +0000 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2024-02-09 17:52:40 +0000 |
commit | 0a0d87c9b851338934f3018e9c18139b6c26f405 (patch) | |
tree | 5b54ea11efc7d7ab3511e0d8ceb6465b5869646a /include/user | |
parent | 8b7fcb8ed159d1caeb0b6e5b753b539d65092282 (diff) |
gdbstub: Add syscall entry/return hooks
The upcoming syscall catchpoint support needs to get control on syscall
entry and return. Provide the necessary hooks for that, which are
no-ops for now.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20240202152506.279476-4-iii@linux.ibm.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240207163812.3231697-13-alex.bennee@linaro.org>
Diffstat (limited to 'include/user')
-rw-r--r-- | include/user/syscall-trace.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/user/syscall-trace.h b/include/user/syscall-trace.h index 557f881a79..b48b2b2d0a 100644 --- a/include/user/syscall-trace.h +++ b/include/user/syscall-trace.h @@ -11,6 +11,7 @@ #define SYSCALL_TRACE_H #include "exec/user/abitypes.h" +#include "gdbstub/user.h" #include "qemu/plugin.h" #include "trace/trace-root.h" @@ -20,7 +21,7 @@ * could potentially unify the -strace code here as well. */ -static inline void record_syscall_start(void *cpu, int num, +static inline void record_syscall_start(CPUState *cpu, int num, abi_long arg1, abi_long arg2, abi_long arg3, abi_long arg4, abi_long arg5, abi_long arg6, @@ -29,11 +30,13 @@ static inline void record_syscall_start(void *cpu, int num, qemu_plugin_vcpu_syscall(cpu, num, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); + gdb_syscall_entry(cpu, num); } -static inline void record_syscall_return(void *cpu, int num, abi_long ret) +static inline void record_syscall_return(CPUState *cpu, int num, abi_long ret) { qemu_plugin_vcpu_syscall_ret(cpu, num, ret); + gdb_syscall_return(cpu, num); } |