* [PATCH 1/2] linux-user: Show SIGCHLD in clone() strace output
@ 2023-01-25 13:57 Helge Deller
2023-01-25 13:57 ` [PATCH 2/2] linux-user: Show 4th argument of rt_sigprocmask() in strace Helge Deller
2023-01-25 14:18 ` [PATCH 1/2] linux-user: Show SIGCHLD in clone() strace output Helge Deller
0 siblings, 2 replies; 4+ messages in thread
From: Helge Deller @ 2023-01-25 13:57 UTC (permalink / raw)
To: Laurent Vivier, qemu-devel; +Cc: Helge Deller
When stracing a program, show up the SIGCHLD value the same
way as it's done when running strace natively, e.g.:
clone(child_stack=0xf7af0040, flags=CLONE_VM|CLONE_VFORK|SIGCHLD, ...
Signed-off-by: Helge Deller <deller@gmx.de>
---
linux-user/strace.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/linux-user/strace.c b/linux-user/strace.c
index 82dc1a1e20..3157e4b420 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -1136,6 +1136,7 @@ UNUSED static struct flags clone_flags[] = {
#if defined(CLONE_IO)
FLAG_GENERIC(CLONE_IO),
#endif
+ FLAG_TARGET(SIGCHLD),
FLAG_END,
};
--
2.38.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] linux-user: Show 4th argument of rt_sigprocmask() in strace
2023-01-25 13:57 [PATCH 1/2] linux-user: Show SIGCHLD in clone() strace output Helge Deller
@ 2023-01-25 13:57 ` Helge Deller
2023-01-30 12:37 ` Laurent Vivier
2023-01-25 14:18 ` [PATCH 1/2] linux-user: Show SIGCHLD in clone() strace output Helge Deller
1 sibling, 1 reply; 4+ messages in thread
From: Helge Deller @ 2023-01-25 13:57 UTC (permalink / raw)
To: Laurent Vivier, qemu-devel; +Cc: Helge Deller
Add output for the missing 4th parameter (size_t sigsetsize).
Signed-off-by: Helge Deller <deller@gmx.de>
---
linux-user/strace.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/linux-user/strace.c b/linux-user/strace.c
index 3157e4b420..e3aa994678 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -3146,7 +3146,8 @@ print_rt_sigprocmask(CPUArchState *cpu_env, const struct syscallname *name,
}
qemu_log("%s,", how);
print_pointer(arg1, 0);
- print_pointer(arg2, 1);
+ print_pointer(arg2, 0);
+ print_raw_param("%d", arg3, 1);
print_syscall_epilogue(name);
}
#endif
--
2.38.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] linux-user: Show SIGCHLD in clone() strace output
2023-01-25 13:57 [PATCH 1/2] linux-user: Show SIGCHLD in clone() strace output Helge Deller
2023-01-25 13:57 ` [PATCH 2/2] linux-user: Show 4th argument of rt_sigprocmask() in strace Helge Deller
@ 2023-01-25 14:18 ` Helge Deller
1 sibling, 0 replies; 4+ messages in thread
From: Helge Deller @ 2023-01-25 14:18 UTC (permalink / raw)
To: Laurent Vivier, qemu-devel
On 1/25/23 14:57, Helge Deller wrote:
> When stracing a program, show up the SIGCHLD value the same
> way as it's done when running strace natively, e.g.:
> clone(child_stack=0xf7af0040, flags=CLONE_VM|CLONE_VFORK|SIGCHLD, ...
>
> Signed-off-by: Helge Deller <deller@gmx.de>
> ---
> linux-user/strace.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/linux-user/strace.c b/linux-user/strace.c
> index 82dc1a1e20..3157e4b420 100644
> --- a/linux-user/strace.c
> +++ b/linux-user/strace.c
> @@ -1136,6 +1136,7 @@ UNUSED static struct flags clone_flags[] = {
> #if defined(CLONE_IO)
> FLAG_GENERIC(CLONE_IO),
> #endif
> + FLAG_TARGET(SIGCHLD),
It's actually not 100% correct, as this would trigger for other SIGxxx values too,
which have the same bits set as TARGET_SIGCHLD. Given the fact that we only support
TARGET_SIGCHLD in clone(), it would nevertheless in most cases show the correct output.
So, probably it's best to not apply this patch it as-is.
Helge
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] linux-user: Show 4th argument of rt_sigprocmask() in strace
2023-01-25 13:57 ` [PATCH 2/2] linux-user: Show 4th argument of rt_sigprocmask() in strace Helge Deller
@ 2023-01-30 12:37 ` Laurent Vivier
0 siblings, 0 replies; 4+ messages in thread
From: Laurent Vivier @ 2023-01-30 12:37 UTC (permalink / raw)
To: Helge Deller, qemu-devel
Le 25/01/2023 à 14:57, Helge Deller a écrit :
> Add output for the missing 4th parameter (size_t sigsetsize).
>
> Signed-off-by: Helge Deller <deller@gmx.de>
> ---
> linux-user/strace.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/linux-user/strace.c b/linux-user/strace.c
> index 3157e4b420..e3aa994678 100644
> --- a/linux-user/strace.c
> +++ b/linux-user/strace.c
> @@ -3146,7 +3146,8 @@ print_rt_sigprocmask(CPUArchState *cpu_env, const struct syscallname *name,
> }
> qemu_log("%s,", how);
> print_pointer(arg1, 0);
> - print_pointer(arg2, 1);
> + print_pointer(arg2, 0);
> + print_raw_param("%d", arg3, 1);
Better with "%u" as size_t is unsigned.
Thanks,
Laurent
> print_syscall_epilogue(name);
> }
> #endif
> --
> 2.38.1
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-01-30 12:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-25 13:57 [PATCH 1/2] linux-user: Show SIGCHLD in clone() strace output Helge Deller
2023-01-25 13:57 ` [PATCH 2/2] linux-user: Show 4th argument of rt_sigprocmask() in strace Helge Deller
2023-01-30 12:37 ` Laurent Vivier
2023-01-25 14:18 ` [PATCH 1/2] linux-user: Show SIGCHLD in clone() strace output Helge Deller
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).