Syscall decoding bugs on ia64
Andreas Schwab
schwab at suse.de
Fri Oct 7 09:24:08 UTC 2005
This patch fixes some syscall decoding bugs on ia64.
Andreas.
2005-10-07 Andreas Schwab <schwab at suse.de>
* ipc.c (sys_shmctl,sys_shmat, sys_shmdt): Use the normal syscall
parameter order on ia64.
* linux/ia64/syscallent.h: Syscall 1105 is gettid, not ioperm.
Index: ipc.c
===================================================================
RCS file: /cvsroot/strace/strace/ipc.c,v
retrieving revision 1.10
diff -u -a -p -u -p -a -r1.10 ipc.c
--- ipc.c 1 Jun 2005 19:02:37 -0000 1.10
+++ ipc.c 7 Oct 2005 16:16:18 -0000
@@ -340,11 +340,11 @@ struct tcb *tcp;
if (entering(tcp)) {
tprintf("%lu, ", tcp->u_arg[0]);
PRINTCTL(shmctl_flags, tcp->u_arg[1], "SHM_???");
-#ifdef LINUX
+#if defined LINUX && !defined IA64
tprintf(", %#lx", tcp->u_arg[3]);
-#else /* !LINUX */
+#else /* !LINUX || IA64 */
tprintf(", %#lx", tcp->u_arg[2]);
-#endif /* !LINUX */
+#endif /* !LINUX || IA64 */
}
return 0;
}
@@ -352,28 +352,28 @@ struct tcb *tcp;
int sys_shmat(tcp)
struct tcb *tcp;
{
-#ifdef LINUX
+#if defined LINUX && !defined IA64
unsigned long raddr;
-#endif /* LINUX */
+#endif /* LINUX && !IA64 */
if (exiting(tcp)) {
tprintf("%lu", tcp->u_arg[0]);
-#ifdef LINUX
+#if defined LINUX && !defined IA64
tprintf(", %#lx", tcp->u_arg[3]);
tprintf(", ");
printflags(shm_flags, tcp->u_arg[1], "SHM_???");
-#else /* !LINUX */
+#else /* !LINUX || IA64 */
tprintf(", %#lx", tcp->u_arg[1]);
tprintf(", ");
printflags(shm_flags, tcp->u_arg[2], "SHM_???");
-#endif /* !LINUX */
+#endif /* !LINUX || IA64 */
if (syserror(tcp))
return 0;
-#ifdef LINUX
+#if defined LINUX && !defined IA64
if (umove(tcp, tcp->u_arg[2], &raddr) < 0)
return RVAL_NONE;
tcp->u_rval = raddr;
-#endif /* LINUX */
+#endif /* LINUX && !IA64 */
return RVAL_HEX;
}
return 0;
@@ -383,11 +383,11 @@ int sys_shmdt(tcp)
struct tcb *tcp;
{
if (entering(tcp))
-#ifdef LINUX
+#if defined LINUX && !defined IA64
tprintf("%#lx", tcp->u_arg[3]);
-#else /* !LINUX */
+#else /* !LINUX || IA64 */
tprintf("%#lx", tcp->u_arg[0]);
-#endif /* !LINUX */
+#endif /* !LINUX || IA64 */
return 0;
}
Index: linux/ia64/syscallent.h
===================================================================
RCS file: /cvsroot/strace/strace/linux/ia64/syscallent.h,v
retrieving revision 1.20
diff -u -a -p -u -p -a -r1.20 linux/ia64/syscallent.h
--- linux/ia64/syscallent.h 5 Jul 2005 03:25:36 -0000 1.20
+++ linux/ia64/syscallent.h 7 Oct 2005 16:16:41 -0000
@@ -1008,7 +1008,7 @@
{ 3, 0, sys_setpriority, "setpriority" }, /* 1102 */
{ 2, TF, sys_statfs, "statfs" }, /* 1103 */
{ 2, TD, sys_fstatfs, "fstatfs" }, /* 1104 */
- { 3, 0, sys_ioperm, "ioperm" }, /* 1105 */
+ { 3, 0, printargs, "gettid" }, /* 1105 */
{ 3, TI, sys_semget, "semget" }, /* 1106 */
{ 3, TI, printargs, "semop" }, /* 1107 */
{ 4, TI, sys_semctl, "semctl" }, /* 1108 */
--
Andreas Schwab, SuSE Labs, schwab at suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the Strace-devel
mailing list