* sigreturn.c (sys_sigreturn) [M68K]: Fetch the words of the
signal mask from the proper place.
---
 sigreturn.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/sigreturn.c b/sigreturn.c
index 648bd0a..a96257f 100644
--- a/sigreturn.c
+++ b/sigreturn.c
@@ -128,8 +128,20 @@ sys_sigreturn(struct tcb *tcp)
                long addr;
                if (upeek(tcp->pid, 4*PT_USP, &addr) < 0)
                        return 0;
+               /* Fetch pointer to struct sigcontext.  */
+               if (umove(tcp, addr + 2 * sizeof(int), &addr) < 0)
+                       return 0;
+               unsigned long mask[NSIG / 8 / sizeof(long)];
+               /* Fetch first word of signal mask.  */
+               if (umove(tcp, addr, &mask[0]) < 0)
+                       return 0;
+               /* Fetch remaining words of signal mask, located
+                  immediately before.  */
+               addr -= sizeof (mask) - sizeof(long);
+               if (umoven(tcp, addr, sizeof (mask) - sizeof(long), (char *) 
&mask[1]) < 0)
+                       return 0;
                tprints("{mask=");
-               print_sigset_addr_len(tcp, addr, NSIG / 8);
+               tprintsigmask_addr("", mask);
                tprints("}");
        }
 #elif defined(ALPHA)
-- 
2.3.2

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to