]> granicus.if.org Git - strace/commitdiff
2002-12-15 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Sun, 15 Dec 2002 23:58:41 +0000 (23:58 +0000)
committerRoland McGrath <roland@redhat.com>
Sun, 15 Dec 2002 23:58:41 +0000 (23:58 +0000)
* signal.c [LINUX && I386]: Provide SA_RESTORER constant if not
defined.  If the bit is set, print the sa_restorer field of sigaction.

signal.c

index 7f39fe9a61923749205ad45c2004f7aedc4813cc..31cde2ad6be4e02ef3ebc46e44b93e7ceebaf615 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -174,6 +174,14 @@ static struct xlat sigvec_flags[] = {
 
 #ifdef HAVE_SIGACTION
 
+#if defined LINUX && defined I386
+/* The libc headers do not define this constant since it should only be
+   used by the implementation.  So wwe define it here.  */
+# ifndef SA_RESTORER
+#  define SA_RESTORER 0x04000000
+# endif
+#endif
+
 static struct xlat sigact_flags[] = {
 #ifdef SA_RESTORER
        { SA_RESTORER,  "SA_RESTORER"   },
@@ -1084,6 +1092,10 @@ struct tcb *tcp;
                        tprintf(", ");
                        if (!printflags(sigact_flags, sa.sa_flags))
                                tprintf("0");
+#ifdef SA_RESTORER
+                       if (sa.sa_flags & SA_RESTORER)
+                               tprintf(", %p", sa.sa_restorer);
+#endif
                        tprintf("}");
                }
        }
@@ -1771,6 +1783,10 @@ sys_rt_sigaction(tcp)
                                tprintf(", ");
                                if (!printflags(sigact_flags, sa.sa_flags))
                                        tprintf("0");
+#ifdef SA_RESTORER
+                               if (sa.sa_flags & SA_RESTORER)
+                                       tprintf(", %p", sa.sa_restorer);
+#endif
                                tprintf("}");
                }
        }