Merge tag 'pull-9p-20240329' of https://github.com/cschoenebeck/qemu into staging
[qemu/armbru.git] / include / user / syscall-trace.h
blobb48b2b2d0aef5a55d950af1b94f1d20fd556820b
1 /*
2 * Common System Call Tracing Wrappers for *-user
4 * Copyright (c) 2019 Linaro
5 * Written by Alex Bennée <alex.bennee@linaro.org>
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
10 #ifndef SYSCALL_TRACE_H
11 #define SYSCALL_TRACE_H
13 #include "exec/user/abitypes.h"
14 #include "gdbstub/user.h"
15 #include "qemu/plugin.h"
16 #include "trace/trace-root.h"
19 * These helpers just provide a common place for the various
20 * subsystems that want to track syscalls to put their hooks in. We
21 * could potentially unify the -strace code here as well.
24 static inline void record_syscall_start(CPUState *cpu, int num,
25 abi_long arg1, abi_long arg2,
26 abi_long arg3, abi_long arg4,
27 abi_long arg5, abi_long arg6,
28 abi_long arg7, abi_long arg8)
30 qemu_plugin_vcpu_syscall(cpu, num,
31 arg1, arg2, arg3, arg4,
32 arg5, arg6, arg7, arg8);
33 gdb_syscall_entry(cpu, num);
36 static inline void record_syscall_return(CPUState *cpu, int num, abi_long ret)
38 qemu_plugin_vcpu_syscall_ret(cpu, num, ret);
39 gdb_syscall_return(cpu, num);
43 #endif /* SYSCALL_TRACE_H */