[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/4] linux-user: Make cpu_env accessible in strace.c
From: |
Laurent Vivier |
Subject: |
Re: [PATCH v2 1/4] linux-user: Make cpu_env accessible in strace.c |
Date: |
Tue, 21 Jul 2020 16:22:06 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 |
Le 13/07/2020 à 11:50, Filip Bozuta a écrit :
> Variable "cpu_env" is used in file "syscall.c" to store
> the information about the cpu environment. This variable
> is used because values of some syscalls can vary between
> cpu architectures. This patch makes the "cpu_env" accessible
> in "strace.c" so it can enable aproppriate "-strace" argument
> printing for these syscalls. This will be a useful addition
> for future "-strace" implementation in QEMU.
>
> Implementation notes:
>
> Functions "print_syscall()" and "print_syscall_ret()" which
> are stated and defined in "qemu.h" and "strace.c" respectively
> are used to print syscall arguments before and after syscall
> execution. These functions were changed with addition of a
> new argument "void *cpu_env". Strucute "struct syscallname"
> in "strace.c" is used to store the information about syscalls.
> Fields "call" and "result" represent pointers to functions which
> are used to print syscall arguments before and after execution.
> These fields were also changed with addition of a new "void *"
> argumetn.
> Also, all defined "print_*" and "print_syscall_ret*" functions
> in "strace.c" were changed to have the new "void *cpu_env".
> This was done to not cause build errors (even though none of
> these functions use this argument).
>
> Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com>
> ---
> linux-user/qemu.h | 4 +-
> linux-user/strace.c | 479 ++++++++++++++++++++++---------------------
> linux-user/syscall.c | 5 +-
> 3 files changed, 247 insertions(+), 241 deletions(-)
>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
- [PATCH v2 0/4] Add strace support for printing arguments for a group of selected syscalls, Filip Bozuta, 2020/07/13
- [PATCH v2 2/4] linux-user: Add strace support for printing arguments of truncate()/ftruncate() and getsid(), Filip Bozuta, 2020/07/13
- [PATCH v2 3/4] linux-user: Add strace support for printing arguments of syscalls used to lock and unlock memory, Filip Bozuta, 2020/07/13
- [PATCH v2 4/4] linux-user: Add strace support for printing arguments of some clock and time functions, Filip Bozuta, 2020/07/13
- [PATCH v2 1/4] linux-user: Make cpu_env accessible in strace.c, Filip Bozuta, 2020/07/13
- Re: [PATCH v2 1/4] linux-user: Make cpu_env accessible in strace.c,
Laurent Vivier <=
- Re: [PATCH v2 0/4] Add strace support for printing arguments for a group of selected syscalls, no-reply, 2020/07/13