qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: "Helge Deller" <deller@gmx.de>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	qemu-devel@nongnu.org
Subject: Re: [PATCH v2] linux-user: Enhance strace output for various syscalls
Date: Tue, 31 Jan 2023 13:01:52 +0100	[thread overview]
Message-ID: <4aed91aa-7d6e-0d6f-e7ff-7d8bd4a4351b@vivier.eu> (raw)
In-Reply-To: <Y5dsfGB1RChGfraW@p100>

Le 12/12/2022 à 19:01, Helge Deller a écrit :
> Add appropriate strace printf formats for various Linux syscalls.
> 
> Signed-off-by: Helge Deller <deller@gmx.de>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> 
> ---
> v2: Fixed a few entries based on review by Philippe Mathieu-Daudé
> 
> diff --git a/linux-user/strace.list b/linux-user/strace.list
> index 3a898e2532..a75101fca1 100644
> --- a/linux-user/strace.list
> +++ b/linux-user/strace.list
> @@ -337,7 +337,7 @@
>   { TARGET_NR_getpagesize, "getpagesize" , NULL, NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_getpeername
> -{ TARGET_NR_getpeername, "getpeername" , NULL, NULL, NULL },
> +{ TARGET_NR_getpeername, "getpeername" , "%s(%d,%p,%p)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_getpgid
>   { TARGET_NR_getpgid, "getpgid" , "%s(%u)", NULL, NULL },
> @@ -361,19 +361,19 @@
>   { TARGET_NR_getrandom, "getrandom", "%s(%p,%u,%u)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_getresgid
> -{ TARGET_NR_getresgid, "getresgid" , NULL, NULL, NULL },
> +{ TARGET_NR_getresgid, "getresgid" , "%s(%p,%p,%p)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_getresgid32
>   { TARGET_NR_getresgid32, "getresgid32" , NULL, NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_getresuid
> -{ TARGET_NR_getresuid, "getresuid" , NULL, NULL, NULL },
> +{ TARGET_NR_getresuid, "getresuid" , "%s(%p,%p,%p)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_getresuid32
>   { TARGET_NR_getresuid32, "getresuid32" , NULL, NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_getrlimit
> -{ TARGET_NR_getrlimit, "getrlimit" , NULL, NULL, NULL },
> +{ TARGET_NR_getrlimit, "getrlimit" , "%s(%d,%p)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_get_robust_list
>   { TARGET_NR_get_robust_list, "get_robust_list" , NULL, NULL, NULL },
> @@ -385,10 +385,10 @@
>   { TARGET_NR_getsid, "getsid" , "%s(%d)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_getsockname
> -{ TARGET_NR_getsockname, "getsockname" , NULL, NULL, NULL },
> +{ TARGET_NR_getsockname, "getsockname" , "%s(%d,%p,%p)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_getsockopt
> -{ TARGET_NR_getsockopt, "getsockopt" , NULL, NULL, NULL },
> +{ TARGET_NR_getsockopt, "getsockopt" , "%s(%d,%d,%d,%p,%p)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_get_thread_area
>   #if defined(TARGET_I386) && defined(TARGET_ABI32)
> @@ -1052,10 +1052,10 @@
>   { TARGET_NR_pivot_root, "pivot_root" , NULL, NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_poll
> -{ TARGET_NR_poll, "poll" , NULL, NULL, NULL },
> +{ TARGET_NR_poll, "poll" , "%s(%p,%u,%d)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_ppoll
> -{ TARGET_NR_ppoll, "ppoll" , NULL, NULL, NULL },
> +{ TARGET_NR_ppoll, "ppoll" , "%s(%p,%u,%p,%p)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_prctl
>   { TARGET_NR_prctl, "prctl" , NULL, NULL, NULL },
> @@ -1124,7 +1124,7 @@
>   { TARGET_NR_reboot, "reboot" , NULL, NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_recv
> -{ TARGET_NR_recv, "recv" , NULL, NULL, NULL },
> +{ TARGET_NR_recv, "recv" , "%s(%d,%p,%u,%d)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_recvfrom
>   { TARGET_NR_recvfrom, "recvfrom" , NULL, NULL, NULL },
> @@ -1184,7 +1184,7 @@
>   { TARGET_NR_rt_sigqueueinfo, "rt_sigqueueinfo" , NULL, print_rt_sigqueueinfo, NULL },
>   #endif
>   #ifdef TARGET_NR_rt_sigreturn
> -{ TARGET_NR_rt_sigreturn, "rt_sigreturn" , NULL, NULL, NULL },
> +{ TARGET_NR_rt_sigreturn, "rt_sigreturn" , "%s(%p)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_rt_sigsuspend
>   { TARGET_NR_rt_sigsuspend, "rt_sigsuspend" , NULL, NULL, NULL },
> @@ -1196,16 +1196,19 @@
>   { TARGET_NR_rt_tgsigqueueinfo, "rt_tgsigqueueinfo" , NULL, print_rt_tgsigqueueinfo, NULL },
>   #endif
>   #ifdef TARGET_NR_sched_getaffinity
> -{ TARGET_NR_sched_getaffinity, "sched_getaffinity" , NULL, NULL, NULL },
> +{ TARGET_NR_sched_getaffinity, "sched_getaffinity" , "%s(%d,%u,%p)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_sched_get_affinity
>   { TARGET_NR_sched_get_affinity, "sched_get_affinity" , NULL, NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_sched_getattr
> -{ TARGET_NR_sched_getattr, "sched_getattr" , NULL, NULL, NULL },
> +{ TARGET_NR_sched_getattr, "sched_getattr" , "%s(%d,%p,%u,%u)", NULL, NULL },
> +#endif
> +#ifdef TARGET_NR_sched_setattr
> +{ TARGET_NR_sched_setattr, "sched_setattr" , "%s(%p,%p)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_sched_getparam
> -{ TARGET_NR_sched_getparam, "sched_getparam" , NULL, NULL, NULL },
> +{ TARGET_NR_sched_getparam, "sched_getparam" , "%s(%d,%p)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_sched_get_priority_max
>   { TARGET_NR_sched_get_priority_max, "sched_get_priority_max" , NULL, NULL, NULL },
> @@ -1220,7 +1223,7 @@
>   { TARGET_NR_sched_rr_get_interval, "sched_rr_get_interval" , NULL, NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_sched_setaffinity
> -{ TARGET_NR_sched_setaffinity, "sched_setaffinity" , NULL, NULL, NULL },
> +{ TARGET_NR_sched_setaffinity, "sched_setaffinity" , "%s(%d,%u,%p)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_sched_setatt
>   { TARGET_NR_sched_setatt, "sched_setatt" , NULL, NULL, NULL },
> @@ -1353,23 +1356,23 @@
>   { TARGET_NR_setreuid32, "setreuid32" , "%s(%u,%u)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_setrlimit
> -{ TARGET_NR_setrlimit, "setrlimit" , NULL, NULL, NULL },
> +{ TARGET_NR_setrlimit, "setrlimit" , "%s(%d,%p)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_set_robust_list
> -{ TARGET_NR_set_robust_list, "set_robust_list" , NULL, NULL, NULL },
> +{ TARGET_NR_set_robust_list, "set_robust_list" , "%s(%p,%u)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_setsid
>   { TARGET_NR_setsid, "setsid" , "%s()", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_setsockopt
> -{ TARGET_NR_setsockopt, "setsockopt" , NULL, NULL, NULL },
> +{ TARGET_NR_setsockopt, "setsockopt" , "%s(%d,%d,%d,%p,%p)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_set_thread_area
>   { TARGET_NR_set_thread_area, "set_thread_area", "%s(0x"TARGET_ABI_FMT_lx")",
>     NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_set_tid_address
> -{ TARGET_NR_set_tid_address, "set_tid_address" , NULL, NULL, NULL },
> +{ TARGET_NR_set_tid_address, "set_tid_address" , "%s(%p)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_settimeofday
>   { TARGET_NR_settimeofday, "settimeofday" , NULL, print_settimeofday, NULL },
> @@ -1648,7 +1651,7 @@
>   { TARGET_NR_vserver, "vserver" , NULL, NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_wait4
> -{ TARGET_NR_wait4, "wait4" , NULL, NULL, NULL },
> +{ TARGET_NR_wait4, "wait4" , "%s(%d,%p,%d,%p)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_waitid
>   { TARGET_NR_waitid, "waitid" , "%s(%#x,%d,%p,%#x)", NULL, NULL },
> @@ -1672,7 +1675,7 @@
>   { TARGET_NR_sync_file_range2, "sync_file_range2", NULL, NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_pipe2
> -{ TARGET_NR_pipe2, "pipe2", NULL, NULL, NULL },
> +{ TARGET_NR_pipe2, "pipe2", "%s(%p,%d)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_pidfd_open
>   { TARGET_NR_pidfd_open, "pidfd_open", "%s(%d,%u)", NULL, NULL },
> 

Applied to my linux-user-for-8.0 branch.

Thanks,
Laurent



      reply	other threads:[~2023-01-31 12:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-12 18:01 [PATCH v2] linux-user: Enhance strace output for various syscalls Helge Deller
2023-01-31 12:01 ` Laurent Vivier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4aed91aa-7d6e-0d6f-e7ff-7d8bd4a4351b@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=deller@gmx.de \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).