[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v8 7/9] linux-user/strace: Improve bind() output
From: |
Laurent Vivier |
Subject: |
Re: [PATCH v8 7/9] linux-user/strace: Improve bind() output |
Date: |
Mon, 21 Oct 2019 15:27:59 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 |
Le 21/10/2019 à 13:48, Philippe Mathieu-Daudé a écrit :
> Tested-By: Guido Günther <address@hidden>
> Reviewed-by: Laurent Vivier <address@hidden>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> v6: use TARGET_NR_socketcall || TARGET_NR_bind (lvivier)
> ---
> linux-user/strace.c | 15 ++++++++++++++-
> linux-user/strace.list | 2 +-
> 2 files changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/linux-user/strace.c b/linux-user/strace.c
> index 0ce2b658a5..cd92c77d33 100644
> --- a/linux-user/strace.c
> +++ b/linux-user/strace.c
> @@ -1707,7 +1707,7 @@ print_socket(const struct syscallname *name,
>
> #endif
>
> -#if defined(TARGET_NR_socketcall)
> +#if defined(TARGET_NR_socketcall) || defined(TARGET_NR_bind)
>
> static void print_sockfd(abi_long sockfd, int last)
> {
> @@ -2054,6 +2054,19 @@ print_socketcall(const struct syscallname *name,
> }
> #endif
>
> +#if defined(TARGET_NR_bind)
> +static void
> +print_bind(const struct syscallname *name,
> + abi_long arg0, abi_long arg1, abi_long arg2,
> + abi_long arg3, abi_long arg4, abi_long arg5)
> +{
> + print_syscall_prologue(name);
> + print_sockfd(arg0, 0);
> + print_sockaddr(arg1, arg2, 1);
> + print_syscall_epilogue(name);
> +}
> +#endif
> +
> #if defined(TARGET_NR_stat) || defined(TARGET_NR_stat64) || \
> defined(TARGET_NR_lstat) || defined(TARGET_NR_lstat64)
> static void
> diff --git a/linux-user/strace.list b/linux-user/strace.list
> index 1ff9168369..957aa720af 100644
> --- a/linux-user/strace.list
> +++ b/linux-user/strace.list
> @@ -41,7 +41,7 @@
> { TARGET_NR_bdflush, "bdflush" , NULL, NULL, NULL },
> #endif
> #ifdef TARGET_NR_bind
> -{ TARGET_NR_bind, "bind" , NULL, NULL, NULL },
> +{ TARGET_NR_bind, "bind" , NULL, print_bind, NULL },
> #endif
> #ifdef TARGET_NR_bpf
> { TARGET_NR_bpf, "bpf" , NULL, NULL, NULL },
>
Applied to my linux-user branch.
Thanks,
Laurent
- Re: [PATCH v8 6/9] linux-user/strace: Add print_sockfd(), (continued)
- [PATCH v8 8/9] linux-user/strace: Let print_sockaddr() have a 'last' argument, Philippe Mathieu-Daudé, 2019/10/21
- [PATCH v8 4/9] linux-user/syscall: Introduce target_sockaddr_nl, Philippe Mathieu-Daudé, 2019/10/21
- [PATCH v8 2/9] linux-user/strace: Add print_timezone(), Philippe Mathieu-Daudé, 2019/10/21
- [PATCH v8 7/9] linux-user/strace: Improve bind() output, Philippe Mathieu-Daudé, 2019/10/21
- Re: [PATCH v8 7/9] linux-user/strace: Improve bind() output,
Laurent Vivier <=
- Re: [PATCH v8 0/9] linux-user: strace improvements, no-reply, 2019/10/21