summaryrefslogtreecommitdiff
path: root/mem.c
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2016-04-22 23:36:26 +0000
committerDmitry V. Levin <ldv@altlinux.org>2016-04-22 23:36:26 +0000
commitbc724ce0bf694069eb21d082640a788ce5caf685 (patch)
tree9481b94af3f4d81d91f7f1d8e1989e2741f9fab4 /mem.c
parent3797d10e827c1ac4da5d0c42c1f7751e29675d34 (diff)
downloadstrace-bc724ce0bf694069eb21d082640a788ce5caf685.tar.gz
Define old_mmap parser only on architectures that use it
* mem.c (SYS_FUNC(old_mmap)): Define only on AARCH64, ARM, I386, X86_64, X32, M68K, S390, and S390X.
Diffstat (limited to 'mem.c')
-rw-r--r--mem.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/mem.c b/mem.c
index 53793e6d1..dbca9a6c8 100644
--- a/mem.c
+++ b/mem.c
@@ -86,22 +86,15 @@ print_mmap(struct tcb *tcp, long *u_arg, unsigned long long offset)
* Confused? Me too!
*/
+#if defined AARCH64 || defined ARM \
+ || defined I386 || defined X86_64 || defined X32 \
+ || defined M68K \
+ || defined S390 || defined S390X
/* Params are pointed to by u_arg[0], offset is in bytes */
SYS_FUNC(old_mmap)
{
long u_arg[6];
-#if defined(IA64)
- /*
- * IA64 processes never call this routine, they only use the
- * new 'sys_mmap' interface. Only IA32 processes come here.
- */
- int i;
- unsigned narrow_arg[6];
- if (umoven(tcp, tcp->u_arg[0], sizeof(narrow_arg), narrow_arg) == -1)
- return 0;
- for (i = 0; i < 6; i++)
- u_arg[i] = (unsigned long) narrow_arg[i];
-#elif defined(X86_64)
+# if defined(X86_64)
/* We are here only in personality 1 (i386) */
int i;
unsigned narrow_arg[6];
@@ -109,14 +102,15 @@ SYS_FUNC(old_mmap)
return 0;
for (i = 0; i < 6; ++i)
u_arg[i] = (unsigned long) narrow_arg[i];
-#else
+# else
if (umoven(tcp, tcp->u_arg[0], sizeof(u_arg), u_arg) == -1)
return 0;
-#endif
+# endif
print_mmap(tcp, u_arg, (unsigned long) u_arg[5]);
return RVAL_DECODED | RVAL_HEX;
}
+#endif /* old_mmap architectures */
#if defined(S390)
/* Params are pointed to by u_arg[0], offset is in pages */