strace/linux/microblaze/arch_sigreturn.c
Dmitry V. Levin 43b7c24994 Introduce print_sigset_addr function
As the definition of NSIG_BYTES is based on NSIG defined in <signal.h>,
NSIG_BYTES cannot be used in files that use kernel sigset_t.

Add another wrapper around print_sigset_addr_len_limit function that
takes one argument less than print_sigset_addr_len wrapper.  This new
wrapper is going to be used in cases when the length argument is equal
to NSIG_BYTES.

* defs.h (print_sigset_addr): New function prototype.
* signal.c (print_sigset_addr): New function.
* linux/alpha/arch_sigreturn.c (arch_sigreturn): Replace
print_sigset_addr_len with print_sigset_addr.
* linux/arm/arch_sigreturn.c (arch_sigreturn): Likewise.
* linux/crisv10/arch_sigreturn.c (arch_sigreturn): Likewise.
* linux/ia64/arch_sigreturn.c (arch_sigreturn): Likewise.
* linux/microblaze/arch_sigreturn.c (arch_sigreturn): Likewise.
* linux/mips/arch_sigreturn.c (arch_sigreturn): Likewise.
* linux/tile/arch_sigreturn.c (arch_sigreturn): Likewise.
* linux/x86_64/arch_sigreturn.c (arch_sigreturn): Likewise.
2017-03-09 22:51:46 +00:00

17 lines
316 B
C

static void
arch_sigreturn(struct tcb *tcp)
{
/* TODO: Verify that this is correct... */
unsigned long addr;
/* Read r1, the stack pointer. */
if (upeek(tcp->pid, 1 * 4, &addr) < 0)
return;
addr += offsetof(struct sigcontext, oldmask);
tprints("{mask=");
print_sigset_addr(tcp, addr);
tprints("}");
}