diff mbox series

[v2] linux-user: Improve strace output of personality() and sysinfo()

Message ID Y9QxskymWJjrKQmT@p100 (mailing list archive)
State New, archived
Headers show
Series [v2] linux-user: Improve strace output of personality() and sysinfo() | expand

Commit Message

Helge Deller Jan. 27, 2023, 8:18 p.m. UTC
Make the strace look nicer for those two syscalls.

Signed-off-by: Helge Deller <deller@gmx.de>

--
v2: use TARGET_ABI_FMT_lx instead of %p in personality output
    as suggested by Philippe Mathieu-Daudé and Laurent Vivier

Comments

Richard Henderson Jan. 27, 2023, 10:53 p.m. UTC | #1
On 1/27/23 10:18, Helge Deller wrote:
> Make the strace look nicer for those two syscalls.
> 
> Signed-off-by: Helge Deller<deller@gmx.de>

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~
Laurent Vivier Jan. 30, 2023, 8:44 a.m. UTC | #2
Le 27/01/2023 à 21:18, Helge Deller a écrit :
> Make the strace look nicer for those two syscalls.
> 
> Signed-off-by: Helge Deller <deller@gmx.de>
> 
> --
> v2: use TARGET_ABI_FMT_lx instead of %p in personality output
>      as suggested by Philippe Mathieu-Daudé and Laurent Vivier
> 
> 
> diff --git a/linux-user/strace.list b/linux-user/strace.list
> index f9254725a1..703c0f1608 100644
> --- a/linux-user/strace.list
> +++ b/linux-user/strace.list
> @@ -1043,7 +1043,8 @@
>   { TARGET_NR_perfctr, "perfctr" , NULL, NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_personality
> -{ TARGET_NR_personality, "personality" , NULL, NULL, NULL },
> +{ TARGET_NR_personality, "personality" , "%s(0x"TARGET_ABI_FMT_lx")", NULL,
> +  print_syscall_ret_addr },
>   #endif
>   #ifdef TARGET_NR_pipe
>   { TARGET_NR_pipe, "pipe" , NULL, NULL, NULL },
> @@ -1502,7 +1503,7 @@
>   { TARGET_NR_sysfs, "sysfs" , NULL, NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_sysinfo
> -{ TARGET_NR_sysinfo, "sysinfo" , NULL, NULL, NULL },
> +{ TARGET_NR_sysinfo, "sysinfo" , "%s(%p)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_sys_kexec_load
>   { TARGET_NR_sys_kexec_load, "sys_kexec_load" , NULL, NULL, NULL },
> 

Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Laurent Vivier Jan. 30, 2023, 8:52 a.m. UTC | #3
Le 27/01/2023 à 21:18, Helge Deller a écrit :
> Make the strace look nicer for those two syscalls.
> 
> Signed-off-by: Helge Deller <deller@gmx.de>
> 
> --
> v2: use TARGET_ABI_FMT_lx instead of %p in personality output
>      as suggested by Philippe Mathieu-Daudé and Laurent Vivier
> 
> 
> diff --git a/linux-user/strace.list b/linux-user/strace.list
> index f9254725a1..703c0f1608 100644
> --- a/linux-user/strace.list
> +++ b/linux-user/strace.list
> @@ -1043,7 +1043,8 @@
>   { TARGET_NR_perfctr, "perfctr" , NULL, NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_personality
> -{ TARGET_NR_personality, "personality" , NULL, NULL, NULL },
> +{ TARGET_NR_personality, "personality" , "%s(0x"TARGET_ABI_FMT_lx")", NULL,
> +  print_syscall_ret_addr },
>   #endif
>   #ifdef TARGET_NR_pipe
>   { TARGET_NR_pipe, "pipe" , NULL, NULL, NULL },
> @@ -1502,7 +1503,7 @@
>   { TARGET_NR_sysfs, "sysfs" , NULL, NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_sysinfo
> -{ TARGET_NR_sysinfo, "sysinfo" , NULL, NULL, NULL },
> +{ TARGET_NR_sysinfo, "sysinfo" , "%s(%p)", NULL, NULL },
>   #endif
>   #ifdef TARGET_NR_sys_kexec_load
>   { TARGET_NR_sys_kexec_load, "sys_kexec_load" , NULL, NULL, NULL },
> 

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

Thanks,
Laurent
diff mbox series

Patch

diff --git a/linux-user/strace.list b/linux-user/strace.list
index f9254725a1..703c0f1608 100644
--- a/linux-user/strace.list
+++ b/linux-user/strace.list
@@ -1043,7 +1043,8 @@ 
 { TARGET_NR_perfctr, "perfctr" , NULL, NULL, NULL },
 #endif
 #ifdef TARGET_NR_personality
-{ TARGET_NR_personality, "personality" , NULL, NULL, NULL },
+{ TARGET_NR_personality, "personality" , "%s(0x"TARGET_ABI_FMT_lx")", NULL,
+  print_syscall_ret_addr },
 #endif
 #ifdef TARGET_NR_pipe
 { TARGET_NR_pipe, "pipe" , NULL, NULL, NULL },
@@ -1502,7 +1503,7 @@ 
 { TARGET_NR_sysfs, "sysfs" , NULL, NULL, NULL },
 #endif
 #ifdef TARGET_NR_sysinfo
-{ TARGET_NR_sysinfo, "sysinfo" , NULL, NULL, NULL },
+{ TARGET_NR_sysinfo, "sysinfo" , "%s(%p)", NULL, NULL },
 #endif
 #ifdef TARGET_NR_sys_kexec_load
 { TARGET_NR_sys_kexec_load, "sys_kexec_load" , NULL, NULL, NULL },