Strace -i option does no work on s390 and s390x

Maxim Shchetynin maxim at de.ibm.com
Mon Jan 24 02:52:41 UTC 2005




Hello,

The -i option on strace on s390 and s390x is not implemented.
>From the strace man page
  -i         Print  the  instruction  pointer at the time of the system call.
The following patch from David J. Wilder, IBM is recommended to fix the problem.
Please, include the patch in the next version of strace.

--- util.c.orig 2003-06-03 16:28:59.000000000 -0700
+++ util.c      2005-01-20 13:49:48.000000000 -0800
@@ -1021,6 +1021,19 @@
                return;
        }
        tprintf("[%08lx] ", eip);
+
+#elif defined(S390) || defined(S390X)
+         long psw;
+         if(upeek(tcp->pid,PT_PSWADDR,&psw) < 0) {
+                 tprintf("[????????] ");
+                 return;
+         }
+#ifdef S390
+         tprintf("[%08lx] ", psw);
+#elif S390X
+       tprintf("[%16lx] ", psw);
+#endif
+
 #elif defined(X86_64)
        long rip;


Mit freundlichen Grüßen

Maxim V. Shchetynin
IBM Deutschland Entwicklung GmbH
Linux für Mainframes
Schönaicher Straße 220
71032 Böblingen, Deutschland

Fahr nur so schnell wie dein Schutzengel fliegen kann!





More information about the Strace-devel mailing list