mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 21:03:54 -06:00
trace: [*-user] Add events to trace guest syscalls in syscall emulation mode
Adds two events to trace syscalls in syscall emulation mode (*-user): * guest_user_syscall: Emitted before the syscall is emulated; contains the syscall number and arguments. * guest_user_syscall_ret: Emitted after the syscall is emulated; contains the syscall number and return value. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Message-id: 146651712411.12388.10024905980452504938.stgit@fimbulvetr.bsc.es Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
06a1e0c197
commit
9c15e70086
3 changed files with 27 additions and 0 deletions
|
@ -6690,6 +6690,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
|
|||
#ifdef DEBUG
|
||||
gemu_log("syscall %d", num);
|
||||
#endif
|
||||
trace_guest_user_syscall(cpu, num, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
|
||||
if(do_strace)
|
||||
print_syscall(num, arg1, arg2, arg3, arg4, arg5, arg6);
|
||||
|
||||
|
@ -11182,6 +11183,7 @@ fail:
|
|||
#endif
|
||||
if(do_strace)
|
||||
print_syscall_ret(num, ret);
|
||||
trace_guest_user_syscall_ret(cpu, num, ret);
|
||||
return ret;
|
||||
efault:
|
||||
ret = -TARGET_EFAULT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue