#include <asm/ldt.h>
#endif
+#ifdef HAVE_LONG_LONG_OFF_T
+/*
+ * Ugly hacks for systems that have a long long off_t
+ */
+#define sys_mmap64 sys_mmap
+#endif
+
int
sys_brk(tcp)
struct tcb *tcp;
#endif
#ifdef MAP_LOCKED
{ MAP_LOCKED,"MAP_LOCKED"},
+#endif
+ /* FreeBSD ones */
+#ifdef MAP_ANON
+ { MAP_ANON, "MAP_ANON" },
+#endif
+#ifdef MAP_HASSEMAPHORE
+ { MAP_HASSEMAPHORE, "MAP_HASSEMAPHORE" },
+#endif
+#ifdef MAP_STACK
+ { MAP_STACK, "MAP_STACK" },
+#endif
+#ifdef MAP_NOSYNC
+ { MAP_NOSYNC, "MAP_NOSYNC" },
+#endif
+#ifdef MAP_NOCORE
+ { MAP_NOCORE, "MAP_NOCORE" },
#endif
{ 0, NULL },
};
+#if !HAVE_LONG_LONG_OFF_T
static
int
print_mmap(tcp,u_arg)
printflags(mmap_prot, u_arg[2]);
tprintf(", ");
/* flags */
+#ifdef MAP_TYPE
printxval(mmap_flags, u_arg[3] & MAP_TYPE, "MAP_???");
addflags(mmap_flags, u_arg[3] & ~MAP_TYPE);
+#else
+ printflags(mmap_flags, u_arg[3]);
+#endif
/* fd */
tprintf(", %ld, ", u_arg[4]);
/* offset */
{
return print_mmap(tcp, tcp->u_arg);
}
+#endif /* !HAVE_LONG_LONG_OFF_T */
+
+#if _LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T
+int
+sys_mmap64(tcp)
+struct tcb *tcp;
+{
+#ifdef linux
+#ifdef ALPHA
+ long *u_arg = tcp->u_arg;
+#else /* !ALPHA */
+ long u_arg[7];
+#endif /* !ALPHA */
+#else /* !linux */
+ long *u_arg = tcp->u_arg;
+#endif /* !linux */
+
+ if (entering(tcp)) {
+#ifdef linux
+#ifndef ALPHA
+ if (umoven(tcp, tcp->u_arg[0], sizeof u_arg,
+ (char *) u_arg) == -1)
+ return 0;
+#endif /* ALPHA */
+#endif /* linux */
+ ALIGN64 (tcp, 5); /* FreeBSD wierdies */
+
+ /* addr */
+ tprintf("%#lx, ", u_arg[0]);
+ /* len */
+ tprintf("%lu, ", u_arg[1]);
+ /* prot */
+ printflags(mmap_prot, u_arg[2]);
+ tprintf(", ");
+ /* flags */
+#ifdef MAP_TYPE
+ printxval(mmap_flags, u_arg[3] & MAP_TYPE, "MAP_???");
+ addflags(mmap_flags, u_arg[3] & ~MAP_TYPE);
+#else
+ printflags(mmap_flags, u_arg[3]);
+#endif
+ /* fd */
+ tprintf(", %ld, ", u_arg[4]);
+ /* offset */
+ tprintf("%#llx", LONG_LONG(u_arg[5], u_arg[6]));
+ }
+ return RVAL_HEX;
+}
+#endif
+
int
sys_munmap(tcp)
struct tcb *tcp;
#ifdef LINUX
static struct xlat mremap_flags[] = {
- { MREMAP_MAYMOVE, "MREMAP_MAYMOVE" },
- { 0, NULL }
+ { MREMAP_MAYMOVE, "MREMAP_MAYMOVE" },
+ { 0, NULL }
};
int
#ifdef MS_ASYNC
static struct xlat mctl_sync[] = {
- { MS_ASYNC, "MS_ASYNC" },
- { MS_INVALIDATE,"MS_INVALIDATE" },
#ifdef MS_SYNC
{ MS_SYNC, "MS_SYNC" },
#endif
+ { MS_ASYNC, "MS_ASYNC" },
+ { MS_INVALIDATE,"MS_INVALIDATE" },
{ 0, NULL },
};