]> git.proxmox.com Git - mirror_qemu.git/commit
linux-user: add strace support for uinfo structure of rt_sigqueueinfo() and rt_tgsigq...
authorMiloš Stojanović <Milos.Stojanovic@rt-rk.com>
Mon, 15 May 2017 14:59:49 +0000 (16:59 +0200)
committerRiku Voipio <riku.voipio@linaro.org>
Mon, 29 May 2017 11:56:09 +0000 (14:56 +0300)
commitba9fcea1cb6d80536f780760d870416fe5b85863
tree4797dabf846681aa84dbb46f2d52782058013052
parentf196c3700deb6ea714228209fb2a864bbfa4b67d
linux-user: add strace support for uinfo structure of rt_sigqueueinfo() and rt_tgsigqueueinfo()

This commit adds support for printing the content of the target_siginfo_t
structure in a similar way to how it is printed by the host strace. The
pointer to this structure is sent as the last argument of the
rt_sigqueueinfo() and rt_tgsigqueueinfo() system calls.
For this purpose, print_siginfo() is used and the get_target_siginfo()
function is implemented in order to get the information obtained from
the pointer into the form that print_siginfo() expects.

The get_target_siginfo() function is based on
host_to_target_siginfo_noswap() in linux-user mode, but here both
arguments are pointers to target_siginfo_t, so instead of converting
the information to siginfo_t it just extracts and copies it to a
target_siginfo_t structure.

Prior to this commit, typical strace output used to look like this:
8307 rt_sigqueueinfo(8307,50,0x00000040007ff6b0) = 0

After this commit, it looks like this:
8307 rt_sigqueueinfo(8307,50,{si_signo=50, si_code=SI_QUEUE, si_pid=8307,
si_uid=1000, si_sigval=17716762128}) = 0

Signed-off-by: Miloš Stojanović <Milos.Stojanovic@rt-rk.com>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user/strace.c