[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 04/12] linux-user/strace: Improve gettimeofda
From: |
Laurent Vivier |
Subject: |
Re: [Qemu-devel] [PATCH v2 04/12] linux-user/strace: Improve gettimeofday() and settimeofday() output |
Date: |
Sun, 1 Jul 2018 21:52:42 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
Le 28/06/2018 à 05:46, Philippe Mathieu-Daudé a écrit :
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> Tested-By: Guido Günther <address@hidden>
> ---
> linux-user/strace.c | 13 +++++++++++++
> linux-user/strace.list | 4 ++--
> 2 files changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/linux-user/strace.c b/linux-user/strace.c
> index b43a21f48b..955fe80ef2 100644
> --- a/linux-user/strace.c
> +++ b/linux-user/strace.c
> @@ -1499,6 +1499,19 @@ print_futimesat(const struct syscallname *name,
> }
> #endif
>
> +#if defined(TARGET_NR_gettimeofday) || defined(TARGET_NR_settimeofday)
> +static void
> +print_timeofday(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_timeval(arg0, 0);
> + print_timezone(arg1, 1);
> + print_syscall_epilogue(name);
> +}
> +#endif
> +
> #ifdef TARGET_NR_link
> static void
> print_link(const struct syscallname *name,
> diff --git a/linux-user/strace.list b/linux-user/strace.list
> index afe4db07f3..9b477b7730 100644
> --- a/linux-user/strace.list
> +++ b/linux-user/strace.list
> @@ -384,7 +384,7 @@
> { TARGET_NR_gettid, "gettid" , "%s()", NULL, NULL },
> #endif
> #ifdef TARGET_NR_gettimeofday
> -{ TARGET_NR_gettimeofday, "gettimeofday" , NULL, NULL, NULL },
> +{ TARGET_NR_gettimeofday, "gettimeofday" , NULL, print_timeofday, NULL },
print_timeofday() will be called before the call of gettimeofday() so I
don't think the values you will print here have any meaning.
Thanks,
Laurent
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH v2 04/12] linux-user/strace: Improve gettimeofday() and settimeofday() output,
Laurent Vivier <=