|
|
244288 |
diff --git a/README b/README
|
|
|
244288 |
index 414bdfb..a04b767 100644
|
|
|
244288 |
--- a/README
|
|
|
244288 |
+++ b/README
|
|
|
244288 |
@@ -24,6 +24,7 @@ The following targets are currently (at least somewhat) supported.
|
|
|
244288 |
Some of them may be more or less broken in reality, it is not feasible
|
|
|
244288 |
to test each release comprehensively on each target.
|
|
|
244288 |
|
|
|
244288 |
+ aarch64-*-linux-gnu
|
|
|
244288 |
armv6l-*-linux-gnueabi
|
|
|
244288 |
armv7l-*-linux-gnueabihf
|
|
|
244288 |
i[4567]86-*-linux-gnu
|
|
|
244288 |
@@ -81,7 +82,7 @@ quick one-liner), it is advisable to send an e-mail beforehand.
|
|
|
244288 |
|
|
|
244288 |
|
|
|
244288 |
-------------------------------------------------------------------------------
|
|
|
244288 |
-Copyright (C) 2012,2013 Petr Machata <pmachata@redhat.com>
|
|
|
244288 |
+Copyright (C) 2012-2014 Petr Machata <pmachata@redhat.com>
|
|
|
244288 |
Copyright (C) 1997-2009 Juan Cespedes <cespedes@debian.org>
|
|
|
244288 |
This file is part of ltrace.
|
|
|
244288 |
|
|
|
244288 |
diff --git a/configure.ac b/configure.ac
|
|
|
244288 |
index c6e6bf0..0e9a124 100644
|
|
|
244288 |
--- a/configure.ac
|
|
|
244288 |
+++ b/configure.ac
|
|
|
244288 |
@@ -1,6 +1,6 @@
|
|
|
244288 |
# -*- Autoconf -*-
|
|
|
244288 |
# This file is part of ltrace.
|
|
|
244288 |
-# Copyright (C) 2010,2012,2013 Petr Machata, Red Hat Inc.
|
|
|
244288 |
+# Copyright (C) 2010,2012,2013,2014 Petr Machata, Red Hat Inc.
|
|
|
244288 |
# Copyright (C) 2010,2011 Joe Damato
|
|
|
244288 |
# Copyright (C) 2010 Marc Kleine-Budde
|
|
|
244288 |
# Copyright (C) 2010 Zachary T Welch
|
|
|
244288 |
@@ -399,6 +399,7 @@ AC_CONFIG_FILES([
|
|
|
244288 |
Makefile
|
|
|
244288 |
sysdeps/Makefile
|
|
|
244288 |
sysdeps/linux-gnu/Makefile
|
|
|
244288 |
+ sysdeps/linux-gnu/aarch64/Makefile
|
|
|
244288 |
sysdeps/linux-gnu/alpha/Makefile
|
|
|
244288 |
sysdeps/linux-gnu/arm/Makefile
|
|
|
244288 |
sysdeps/linux-gnu/cris/Makefile
|
|
|
244288 |
diff --git a/etc/libc.so.conf b/etc/libc.so.conf
|
|
|
244288 |
index 669c50a..48b3b01 100644
|
|
|
244288 |
--- a/etc/libc.so.conf
|
|
|
244288 |
+++ b/etc/libc.so.conf
|
|
|
244288 |
@@ -1,5 +1,12 @@
|
|
|
244288 |
# See ltrace.conf(5) for description of syntax of this file.
|
|
|
244288 |
|
|
|
244288 |
+# XXX ltrace misses long double and long long support
|
|
|
244288 |
+typedef ldouble = double;
|
|
|
244288 |
+typedef llong = long;
|
|
|
244288 |
+typedef ullong = ulong;
|
|
|
244288 |
+
|
|
|
244288 |
+void __libc_start_main(hide(void*), hide(int), array(string, arg2));
|
|
|
244288 |
+
|
|
|
244288 |
# arpa/inet.h
|
|
|
244288 |
typedef in_addr = struct(hex(uint));
|
|
|
244288 |
int inet_aton(string, +in_addr*);
|
|
|
244288 |
@@ -233,9 +240,22 @@ void setbuffer(file,addr,ulong);
|
|
|
244288 |
void setlinebuf(file);
|
|
|
244288 |
int rename(string,string);
|
|
|
244288 |
|
|
|
244288 |
+# xlocale.h
|
|
|
244288 |
+typedef locale_t = void*;
|
|
|
244288 |
+locale_t newlocale(hex(int), string, locale_t);
|
|
|
244288 |
+
|
|
|
244288 |
# stdlib.h
|
|
|
244288 |
-long __strtol_internal(string,addr,int);
|
|
|
244288 |
-ulong __strtoul_internal(string,addr,int);
|
|
|
244288 |
+long __strtol_internal(string, +string*, int);
|
|
|
244288 |
+ulong __strtoul_internal(string, +string*, int);
|
|
|
244288 |
+
|
|
|
244288 |
+double strtod(string, +string*);
|
|
|
244288 |
+float strtof(string, +string*);
|
|
|
244288 |
+ldouble strtold(string, +string*);
|
|
|
244288 |
+
|
|
|
244288 |
+double strtod_l(string, +string*, locale_t);
|
|
|
244288 |
+float strtof_l(string, +string*, locale_t);
|
|
|
244288 |
+ldouble strtold_l(string, +string*, locale_t);
|
|
|
244288 |
+
|
|
|
244288 |
int atexit(addr);
|
|
|
244288 |
addr bsearch(string, addr, ulong, ulong, addr);
|
|
|
244288 |
addr calloc(ulong, ulong);
|
|
|
244288 |
@@ -343,6 +363,10 @@ addr gmtime(addr);
|
|
|
244288 |
addr localtime(addr);
|
|
|
244288 |
ulong strftime(+string2,ulong,string,addr);
|
|
|
244288 |
long time(addr);
|
|
|
244288 |
+# XXX in fact (time_t, long), which may be (llong, long) on 32-bit
|
|
|
244288 |
+# arches. We don't have llong as of this writing.
|
|
|
244288 |
+typedef timespec = struct(long, long);
|
|
|
244288 |
+int nanosleep(timespec*, timespec*);
|
|
|
244288 |
|
|
|
244288 |
# unistd.h
|
|
|
244288 |
void _exit(int);
|
|
|
244288 |
diff --git a/etc/syscalls.conf b/etc/syscalls.conf
|
|
|
244288 |
index 562f4e7..09d347d 100644
|
|
|
244288 |
--- a/etc/syscalls.conf
|
|
|
244288 |
+++ b/etc/syscalls.conf
|
|
|
244288 |
@@ -1,6 +1,10 @@
|
|
|
244288 |
# syscall.conf -- system call prototypes
|
|
|
244288 |
# See ltrace.conf(5) for description of syntax of this file.
|
|
|
244288 |
|
|
|
244288 |
+# Special value used to indicate the *at functions should use the
|
|
|
244288 |
+# current working directory.
|
|
|
244288 |
+typedef at_dirfd_t = enum[int](AT_FDCWD=-100);
|
|
|
244288 |
+
|
|
|
244288 |
addr brk(addr);
|
|
|
244288 |
int close(int);
|
|
|
244288 |
int execve(string,addr,addr);
|
|
|
244288 |
@@ -14,7 +18,7 @@ int getpid();
|
|
|
244288 |
addr mmap(addr,ulong,int,int,int,long);
|
|
|
244288 |
|
|
|
244288 |
int munmap(addr,ulong);
|
|
|
244288 |
-int open(string,int,octal);
|
|
|
244288 |
+int open(string, hex(uint), oct(uint));
|
|
|
244288 |
int personality(uint);
|
|
|
244288 |
long read(int,+string0,ulong);
|
|
|
244288 |
int stat(string,addr);
|
|
|
244288 |
@@ -113,3 +117,30 @@ ulong writev(int,addr,int);
|
|
|
244288 |
int mprotect(addr,int,int);
|
|
|
244288 |
int access(string,octal);
|
|
|
244288 |
int getdents(uint, void *, uint);
|
|
|
244288 |
+
|
|
|
244288 |
+int openat(at_dirfd_t, string, hex(uint), oct(uint));
|
|
|
244288 |
+int mknodat(at_dirfd_t, string, oct(uint), ushort)
|
|
|
244288 |
+int mkdirat(at_dirfd_t, string, oct(uint));
|
|
|
244288 |
+int unlinkat(at_dirfd_t, string, hex(uint));
|
|
|
244288 |
+int symlinkat(string, at_dirfd_t, string);
|
|
|
244288 |
+int linkat(at_dirfd_t, string, at_dirfd_t, string, hex(uint));
|
|
|
244288 |
+int renameat(at_dirfd_t, string, at_dirfd_t, string);
|
|
|
244288 |
+int faccessat(at_dirfd_t, string, oct(uint), hex(uint));
|
|
|
244288 |
+int fchmodat(at_dirfd_t, string, oct(uint), hex(uint));
|
|
|
244288 |
+int fchownat(at_dirfd_t, string, int, int, hex(uint));
|
|
|
244288 |
+int readlinkat(at_dirfd_t, string, +string[arg4], ulong);
|
|
|
244288 |
+int fstatat(at_dirfd_t, string, addr, hex(uint));
|
|
|
244288 |
+int utimensat(at_dirfd_t, string, addr, hex(uint));
|
|
|
244288 |
+int futimens(int, addr);
|
|
|
244288 |
+int futimesat(at_dirfd_t, string, addr);
|
|
|
244288 |
+addr shmat(int, addr, hex(uint));
|
|
|
244288 |
+int shmdt(addr);
|
|
|
244288 |
+
|
|
|
244288 |
+typedef fid_type = enum(FILEID_ROOT=0, FILEID_INO32_GEN=1, FILEID_INO32_GEN_PARENT=2, FILEID_BTRFS_WITHOUT_PARENT=0x4d, FILEID_BTRFS_WITH_PARENT=0x4e, FILEID_BTRFS_WITH_PARENT_ROOT=0x4f, FILEID_UDF_WITHOUT_PARENT=0x51, FILEID_UDF_WITH_PARENT=0x52, FILEID_NILFS_WITHOUT_PARENT=0x61, FILEID_NILFS_WITH_PARENT=0x62);
|
|
|
244288 |
+typedef file_handle = struct(uint, fid_type, array(hex(char), elt1)*);
|
|
|
244288 |
+int name_to_handle_at(at_dirfd_t, string, file_handle, int*, hex(uint));
|
|
|
244288 |
+int open_by_handle_at(at_dirfd_t, file_handle, hex(uint));
|
|
|
244288 |
+
|
|
|
244288 |
+int newfstatat(at_dirfd_t, string, addr, hex(uint));
|
|
|
244288 |
+int creat(string, oct(int));
|
|
|
244288 |
+int ustat(ushort, addr);
|
|
|
244288 |
diff --git a/sysdeps/linux-gnu/Makefile.am b/sysdeps/linux-gnu/Makefile.am
|
|
|
244288 |
index ecee577..ec26162 100644
|
|
|
244288 |
--- a/sysdeps/linux-gnu/Makefile.am
|
|
|
244288 |
+++ b/sysdeps/linux-gnu/Makefile.am
|
|
|
244288 |
@@ -1,4 +1,5 @@
|
|
|
244288 |
# This file is part of ltrace.
|
|
|
244288 |
+# Copyright (C) 2014 Petr Machata, Red Hat, Inc.
|
|
|
244288 |
# Copyright (C) 2010,2012 Marc Kleine-Budde, Pengutronix
|
|
|
244288 |
#
|
|
|
244288 |
# This program is free software; you can redistribute it and/or
|
|
|
244288 |
@@ -16,7 +17,8 @@
|
|
|
244288 |
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
|
244288 |
# 02110-1301 USA
|
|
|
244288 |
|
|
|
244288 |
-DIST_SUBDIRS = alpha arm cris ia64 m68k metag mips ppc s390 sparc x86
|
|
|
244288 |
+DIST_SUBDIRS = aarch64 alpha arm cris ia64 m68k metag mips ppc s390 \
|
|
|
244288 |
+ sparc x86
|
|
|
244288 |
|
|
|
244288 |
SUBDIRS = \
|
|
|
244288 |
$(HOST_CPU)
|
|
|
244288 |
diff --git a/sysdeps/linux-gnu/aarch64/Makefile.am b/sysdeps/linux-gnu/aarch64/Makefile.am
|
|
|
244288 |
new file mode 100644
|
|
|
244288 |
index 0000000..0af4e6e
|
|
|
244288 |
--- /dev/null
|
|
|
244288 |
+++ b/sysdeps/linux-gnu/aarch64/Makefile.am
|
|
|
244288 |
@@ -0,0 +1,25 @@
|
|
|
244288 |
+# This file is part of ltrace.
|
|
|
244288 |
+# Copyright (C) 2014 Petr Machata, Red Hat, Inc.
|
|
|
244288 |
+#
|
|
|
244288 |
+# This program is free software; you can redistribute it and/or
|
|
|
244288 |
+# modify it under the terms of the GNU General Public License as
|
|
|
244288 |
+# published by the Free Software Foundation; either version 2 of the
|
|
|
244288 |
+# License, or (at your option) any later version.
|
|
|
244288 |
+#
|
|
|
244288 |
+# This program is distributed in the hope that it will be useful, but
|
|
|
244288 |
+# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
244288 |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
244288 |
+# General Public License for more details.
|
|
|
244288 |
+#
|
|
|
244288 |
+# You should have received a copy of the GNU General Public License
|
|
|
244288 |
+# along with this program; if not, write to the Free Software
|
|
|
244288 |
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
|
244288 |
+# 02110-1301 USA
|
|
|
244288 |
+
|
|
|
244288 |
+noinst_LTLIBRARIES = ../libcpu.la
|
|
|
244288 |
+
|
|
|
244288 |
+___libcpu_la_SOURCES = fetch.c plt.c regs.c trace.c
|
|
|
244288 |
+
|
|
|
244288 |
+noinst_HEADERS = arch.h ptrace.h signalent.h syscallent.h
|
|
|
244288 |
+
|
|
|
244288 |
+MAINTAINERCLEANFILES = Makefile.in
|
|
|
244288 |
diff --git a/sysdeps/linux-gnu/aarch64/arch.h b/sysdeps/linux-gnu/aarch64/arch.h
|
|
|
244288 |
new file mode 100644
|
|
|
244288 |
index 0000000..4137613
|
|
|
244288 |
--- /dev/null
|
|
|
244288 |
+++ b/sysdeps/linux-gnu/aarch64/arch.h
|
|
|
244288 |
@@ -0,0 +1,37 @@
|
|
|
244288 |
+/*
|
|
|
244288 |
+ * This file is part of ltrace.
|
|
|
244288 |
+ * Copyright (C) 2014 Petr Machata, Red Hat, Inc.
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * This program is free software; you can redistribute it and/or
|
|
|
244288 |
+ * modify it under the terms of the GNU General Public License as
|
|
|
244288 |
+ * published by the Free Software Foundation; either version 2 of the
|
|
|
244288 |
+ * License, or (at your option) any later version.
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * This program is distributed in the hope that it will be useful, but
|
|
|
244288 |
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
244288 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
244288 |
+ * General Public License for more details.
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * You should have received a copy of the GNU General Public License
|
|
|
244288 |
+ * along with this program; if not, write to the Free Software
|
|
|
244288 |
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
|
244288 |
+ * 02110-1301 USA
|
|
|
244288 |
+ */
|
|
|
244288 |
+#ifndef LTRACE_AARCH64_ARCH_H
|
|
|
244288 |
+#define LTRACE_AARCH64_ARCH_H
|
|
|
244288 |
+
|
|
|
244288 |
+/* | 31 21 | 20 5 | 4 0 | *
|
|
|
244288 |
+ * | 1 1 0 1 0 1 0 0 0 0 1 | imm16 | 0 0 0 0 0 | */
|
|
|
244288 |
+#define BREAKPOINT_VALUE { 0xd4, 0x20, 0, 0 }
|
|
|
244288 |
+#define BREAKPOINT_LENGTH 4
|
|
|
244288 |
+#define DECR_PC_AFTER_BREAK 0
|
|
|
244288 |
+
|
|
|
244288 |
+#define LT_ELFCLASS ELFCLASS64
|
|
|
244288 |
+#define LT_ELF_MACHINE EM_AARCH64
|
|
|
244288 |
+
|
|
|
244288 |
+#define ARCH_HAVE_FETCH_ARG
|
|
|
244288 |
+#define ARCH_ENDIAN_BIG
|
|
|
244288 |
+#define ARCH_HAVE_SIZEOF
|
|
|
244288 |
+#define ARCH_HAVE_ALIGNOF
|
|
|
244288 |
+
|
|
|
244288 |
+#endif /* LTRACE_AARCH64_ARCH_H */
|
|
|
244288 |
diff --git a/sysdeps/linux-gnu/aarch64/fetch.c b/sysdeps/linux-gnu/aarch64/fetch.c
|
|
|
244288 |
new file mode 100644
|
|
|
244288 |
index 0000000..8779f03
|
|
|
244288 |
--- /dev/null
|
|
|
244288 |
+++ b/sysdeps/linux-gnu/aarch64/fetch.c
|
|
|
244288 |
@@ -0,0 +1,365 @@
|
|
|
244288 |
+/*
|
|
|
244288 |
+ * This file is part of ltrace.
|
|
|
244288 |
+ * Copyright (C) 2014 Petr Machata, Red Hat, Inc.
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * This program is free software; you can redistribute it and/or
|
|
|
244288 |
+ * modify it under the terms of the GNU General Public License as
|
|
|
244288 |
+ * published by the Free Software Foundation; either version 2 of the
|
|
|
244288 |
+ * License, or (at your option) any later version.
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * This program is distributed in the hope that it will be useful, but
|
|
|
244288 |
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
244288 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
244288 |
+ * General Public License for more details.
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * You should have received a copy of the GNU General Public License
|
|
|
244288 |
+ * along with this program; if not, write to the Free Software
|
|
|
244288 |
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
|
244288 |
+ * 02110-1301 USA
|
|
|
244288 |
+ */
|
|
|
244288 |
+
|
|
|
244288 |
+#include <sys/ptrace.h>
|
|
|
244288 |
+#include <asm/ptrace.h>
|
|
|
244288 |
+#include <stdlib.h>
|
|
|
244288 |
+#include <string.h>
|
|
|
244288 |
+
|
|
|
244288 |
+#include "fetch.h"
|
|
|
244288 |
+#include "proc.h"
|
|
|
244288 |
+#include "type.h"
|
|
|
244288 |
+#include "value.h"
|
|
|
244288 |
+
|
|
|
244288 |
+int aarch64_read_gregs(struct process *proc, struct user_pt_regs *regs);
|
|
|
244288 |
+int aarch64_read_fregs(struct process *proc, struct user_fpsimd_state *regs);
|
|
|
244288 |
+
|
|
|
244288 |
+
|
|
|
244288 |
+struct fetch_context
|
|
|
244288 |
+{
|
|
|
244288 |
+ struct user_pt_regs gregs;
|
|
|
244288 |
+ struct user_fpsimd_state fpregs;
|
|
|
244288 |
+ arch_addr_t nsaa;
|
|
|
244288 |
+ unsigned ngrn;
|
|
|
244288 |
+ unsigned nsrn;
|
|
|
244288 |
+ arch_addr_t x8;
|
|
|
244288 |
+};
|
|
|
244288 |
+
|
|
|
244288 |
+static int
|
|
|
244288 |
+context_init(struct fetch_context *context, struct process *proc)
|
|
|
244288 |
+{
|
|
|
244288 |
+ if (aarch64_read_gregs(proc, &context->gregs) < 0
|
|
|
244288 |
+ || aarch64_read_fregs(proc, &context->fpregs) < 0)
|
|
|
244288 |
+ return -1;
|
|
|
244288 |
+
|
|
|
244288 |
+ context->ngrn = 0;
|
|
|
244288 |
+ context->nsrn = 0;
|
|
|
244288 |
+ /* XXX double cast */
|
|
|
244288 |
+ context->nsaa = (arch_addr_t) (uintptr_t) context->gregs.sp;
|
|
|
244288 |
+ context->x8 = 0;
|
|
|
244288 |
+
|
|
|
244288 |
+ return 0;
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+struct fetch_context *
|
|
|
244288 |
+arch_fetch_arg_clone(struct process *proc, struct fetch_context *context)
|
|
|
244288 |
+{
|
|
|
244288 |
+ struct fetch_context *ret = malloc(sizeof(*ret));
|
|
|
244288 |
+ if (ret == NULL)
|
|
|
244288 |
+ return NULL;
|
|
|
244288 |
+ return memcpy(ret, context, sizeof(*ret));
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+static void
|
|
|
244288 |
+fetch_next_gpr(struct fetch_context *context, unsigned char *buf)
|
|
|
244288 |
+{
|
|
|
244288 |
+ uint64_t u = context->gregs.regs[context->ngrn++];
|
|
|
244288 |
+ memcpy(buf, &u, 8);
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+static int
|
|
|
244288 |
+fetch_gpr(struct fetch_context *context, struct value *value, size_t sz)
|
|
|
244288 |
+{
|
|
|
244288 |
+ if (sz < 8)
|
|
|
244288 |
+ sz = 8;
|
|
|
244288 |
+
|
|
|
244288 |
+ unsigned char *buf = value_reserve(value, sz);
|
|
|
244288 |
+ if (buf == NULL)
|
|
|
244288 |
+ return -1;
|
|
|
244288 |
+
|
|
|
244288 |
+ size_t i;
|
|
|
244288 |
+ for (i = 0; i < sz; i += 8)
|
|
|
244288 |
+ fetch_next_gpr(context, buf + i);
|
|
|
244288 |
+
|
|
|
244288 |
+ return 0;
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+static void
|
|
|
244288 |
+fetch_next_sse(struct fetch_context *context, unsigned char *buf, size_t sz)
|
|
|
244288 |
+{
|
|
|
244288 |
+ __int128 u = context->fpregs.vregs[context->nsrn++];
|
|
|
244288 |
+ memcpy(buf, &u, sz);
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+static int
|
|
|
244288 |
+fetch_sse(struct fetch_context *context, struct value *value, size_t sz)
|
|
|
244288 |
+{
|
|
|
244288 |
+ unsigned char *buf = value_reserve(value, sz);
|
|
|
244288 |
+ if (buf == NULL)
|
|
|
244288 |
+ return -1;
|
|
|
244288 |
+
|
|
|
244288 |
+ fetch_next_sse(context, buf, sz);
|
|
|
244288 |
+ return 0;
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+static int
|
|
|
244288 |
+fetch_hfa(struct fetch_context *context,
|
|
|
244288 |
+ struct value *value, struct arg_type_info *hfa_t, size_t count)
|
|
|
244288 |
+{
|
|
|
244288 |
+ size_t sz = type_sizeof(value->inferior, hfa_t);
|
|
|
244288 |
+ unsigned char *buf = value_reserve(value, sz * count);
|
|
|
244288 |
+ if (buf == NULL)
|
|
|
244288 |
+ return -1;
|
|
|
244288 |
+
|
|
|
244288 |
+ size_t i;
|
|
|
244288 |
+ for (i = 0; i < count; ++i) {
|
|
|
244288 |
+ fetch_next_sse(context, buf, sz);
|
|
|
244288 |
+ buf += sz;
|
|
|
244288 |
+ }
|
|
|
244288 |
+ return 0;
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+static int
|
|
|
244288 |
+fetch_stack(struct fetch_context *context, struct value *value,
|
|
|
244288 |
+ size_t align, size_t sz)
|
|
|
244288 |
+{
|
|
|
244288 |
+ if (align < 8)
|
|
|
244288 |
+ align = 8;
|
|
|
244288 |
+ size_t amount = ((sz + align - 1) / align) * align;
|
|
|
244288 |
+
|
|
|
244288 |
+ /* XXX double casts */
|
|
|
244288 |
+ uintptr_t sp = (uintptr_t) context->nsaa;
|
|
|
244288 |
+ sp = ((sp + align - 1) / align) * align;
|
|
|
244288 |
+
|
|
|
244288 |
+ value_in_inferior(value, (arch_addr_t) sp);
|
|
|
244288 |
+
|
|
|
244288 |
+ sp += amount;
|
|
|
244288 |
+ context->nsaa = (arch_addr_t) sp;
|
|
|
244288 |
+
|
|
|
244288 |
+ return 0;
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+enum convert_method {
|
|
|
244288 |
+ CVT_ERR = -1,
|
|
|
244288 |
+ CVT_NOP = 0,
|
|
|
244288 |
+ CVT_BYREF,
|
|
|
244288 |
+};
|
|
|
244288 |
+
|
|
|
244288 |
+enum fetch_method {
|
|
|
244288 |
+ FETCH_NOP,
|
|
|
244288 |
+ FETCH_STACK,
|
|
|
244288 |
+ FETCH_GPR,
|
|
|
244288 |
+ FETCH_SSE,
|
|
|
244288 |
+ FETCH_HFA,
|
|
|
244288 |
+};
|
|
|
244288 |
+
|
|
|
244288 |
+struct fetch_script {
|
|
|
244288 |
+ enum convert_method c;
|
|
|
244288 |
+ enum fetch_method f;
|
|
|
244288 |
+ size_t sz;
|
|
|
244288 |
+ struct arg_type_info *hfa_t;
|
|
|
244288 |
+ size_t count;
|
|
|
244288 |
+};
|
|
|
244288 |
+
|
|
|
244288 |
+static struct fetch_script
|
|
|
244288 |
+pass_arg(struct fetch_context const *context,
|
|
|
244288 |
+ struct process *proc, struct arg_type_info *info)
|
|
|
244288 |
+{
|
|
|
244288 |
+ enum fetch_method cvt = CVT_NOP;
|
|
|
244288 |
+
|
|
|
244288 |
+ size_t sz = type_sizeof(proc, info);
|
|
|
244288 |
+ if (sz == (size_t) -1)
|
|
|
244288 |
+ return (struct fetch_script) { CVT_ERR, FETCH_NOP, sz };
|
|
|
244288 |
+
|
|
|
244288 |
+ switch (info->type) {
|
|
|
244288 |
+ case ARGTYPE_VOID:
|
|
|
244288 |
+ return (struct fetch_script) { cvt, FETCH_NOP, sz };
|
|
|
244288 |
+
|
|
|
244288 |
+ case ARGTYPE_STRUCT:
|
|
|
244288 |
+ case ARGTYPE_ARRAY:;
|
|
|
244288 |
+ size_t count;
|
|
|
244288 |
+ struct arg_type_info *hfa_t = type_get_hfa_type(info, &count);
|
|
|
244288 |
+ if (hfa_t != NULL && count <= 4) {
|
|
|
244288 |
+ if (context->nsrn + count <= 8)
|
|
|
244288 |
+ return (struct fetch_script)
|
|
|
244288 |
+ { cvt, FETCH_HFA, sz, hfa_t, count };
|
|
|
244288 |
+ return (struct fetch_script)
|
|
|
244288 |
+ { cvt, FETCH_STACK, sz, hfa_t, count };
|
|
|
244288 |
+ }
|
|
|
244288 |
+
|
|
|
244288 |
+ if (sz <= 16) {
|
|
|
244288 |
+ size_t count = sz / 8;
|
|
|
244288 |
+ if (context->ngrn + count <= 8)
|
|
|
244288 |
+ return (struct fetch_script)
|
|
|
244288 |
+ { cvt, FETCH_GPR, sz };
|
|
|
244288 |
+ }
|
|
|
244288 |
+
|
|
|
244288 |
+ cvt = CVT_BYREF;
|
|
|
244288 |
+ sz = 8;
|
|
|
244288 |
+ /* Fall through. */
|
|
|
244288 |
+
|
|
|
244288 |
+ case ARGTYPE_POINTER:
|
|
|
244288 |
+ case ARGTYPE_INT:
|
|
|
244288 |
+ case ARGTYPE_UINT:
|
|
|
244288 |
+ case ARGTYPE_LONG:
|
|
|
244288 |
+ case ARGTYPE_ULONG:
|
|
|
244288 |
+ case ARGTYPE_CHAR:
|
|
|
244288 |
+ case ARGTYPE_SHORT:
|
|
|
244288 |
+ case ARGTYPE_USHORT:
|
|
|
244288 |
+ if (context->ngrn < 8 && sz <= 8)
|
|
|
244288 |
+ return (struct fetch_script) { cvt, FETCH_GPR, sz };
|
|
|
244288 |
+ /* We don't support types wider than 8 bytes as of
|
|
|
244288 |
+ * now. */
|
|
|
244288 |
+ assert(sz <= 8);
|
|
|
244288 |
+
|
|
|
244288 |
+ return (struct fetch_script) { cvt, FETCH_STACK, sz };
|
|
|
244288 |
+
|
|
|
244288 |
+ case ARGTYPE_FLOAT:
|
|
|
244288 |
+ case ARGTYPE_DOUBLE:
|
|
|
244288 |
+ if (context->nsrn < 8) {
|
|
|
244288 |
+ /* ltrace doesn't support float128. */
|
|
|
244288 |
+ assert(sz <= 8);
|
|
|
244288 |
+ return (struct fetch_script) { cvt, FETCH_SSE, sz };
|
|
|
244288 |
+ }
|
|
|
244288 |
+
|
|
|
244288 |
+ return (struct fetch_script) { cvt, FETCH_STACK, sz };
|
|
|
244288 |
+ }
|
|
|
244288 |
+
|
|
|
244288 |
+ assert(! "Failed to allocate argument.");
|
|
|
244288 |
+ abort();
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+static int
|
|
|
244288 |
+convert_arg(struct value *value, struct fetch_script how)
|
|
|
244288 |
+{
|
|
|
244288 |
+ switch (how.c) {
|
|
|
244288 |
+ case CVT_NOP:
|
|
|
244288 |
+ return 0;
|
|
|
244288 |
+ case CVT_BYREF:
|
|
|
244288 |
+ return value_pass_by_reference(value);
|
|
|
244288 |
+ case CVT_ERR:
|
|
|
244288 |
+ return -1;
|
|
|
244288 |
+ }
|
|
|
244288 |
+
|
|
|
244288 |
+ assert(! "Don't know how to convert argument.");
|
|
|
244288 |
+ abort();
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+static int
|
|
|
244288 |
+fetch_arg(struct fetch_context *context,
|
|
|
244288 |
+ struct process *proc, struct arg_type_info *info,
|
|
|
244288 |
+ struct value *value, struct fetch_script how)
|
|
|
244288 |
+{
|
|
|
244288 |
+ if (convert_arg(value, how) < 0)
|
|
|
244288 |
+ return -1;
|
|
|
244288 |
+
|
|
|
244288 |
+ switch (how.f) {
|
|
|
244288 |
+ case FETCH_NOP:
|
|
|
244288 |
+ return 0;
|
|
|
244288 |
+
|
|
|
244288 |
+ case FETCH_STACK:
|
|
|
244288 |
+ if (how.hfa_t != NULL && how.count != 0 && how.count <= 8)
|
|
|
244288 |
+ context->nsrn = 8;
|
|
|
244288 |
+ return fetch_stack(context, value,
|
|
|
244288 |
+ type_alignof(proc, info), how.sz);
|
|
|
244288 |
+
|
|
|
244288 |
+ case FETCH_GPR:
|
|
|
244288 |
+ return fetch_gpr(context, value, how.sz);
|
|
|
244288 |
+
|
|
|
244288 |
+ case FETCH_SSE:
|
|
|
244288 |
+ return fetch_sse(context, value, how.sz);
|
|
|
244288 |
+
|
|
|
244288 |
+ case FETCH_HFA:
|
|
|
244288 |
+ return fetch_hfa(context, value, how.hfa_t, how.count);
|
|
|
244288 |
+ }
|
|
|
244288 |
+
|
|
|
244288 |
+ assert(! "Don't know how to fetch argument.");
|
|
|
244288 |
+ abort();
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+struct fetch_context *
|
|
|
244288 |
+arch_fetch_arg_init(enum tof type, struct process *proc,
|
|
|
244288 |
+ struct arg_type_info *ret_info)
|
|
|
244288 |
+{
|
|
|
244288 |
+ struct fetch_context *context = malloc(sizeof *context);
|
|
|
244288 |
+ if (context == NULL || context_init(context, proc) < 0) {
|
|
|
244288 |
+ fail:
|
|
|
244288 |
+ free(context);
|
|
|
244288 |
+ return NULL;
|
|
|
244288 |
+ }
|
|
|
244288 |
+
|
|
|
244288 |
+ /* There's a provision in ARMv8 parameter passing convention
|
|
|
244288 |
+ * for returning types that, if passed as first argument to a
|
|
|
244288 |
+ * function, would be passed on stack. For those types, x8
|
|
|
244288 |
+ * contains an address where the return argument should be
|
|
|
244288 |
+ * placed. The callee doesn't need to preserve the value of
|
|
|
244288 |
+ * x8, so we need to fetch it now.
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * To my knowledge, there are currently no types where this
|
|
|
244288 |
+ * holds, but the code is here, utterly untested. */
|
|
|
244288 |
+
|
|
|
244288 |
+ struct fetch_script how = pass_arg(context, proc, ret_info);
|
|
|
244288 |
+ if (how.c == CVT_ERR)
|
|
|
244288 |
+ goto fail;
|
|
|
244288 |
+ if (how.c == CVT_NOP && how.f == FETCH_STACK) {
|
|
|
244288 |
+ /* XXX double cast. */
|
|
|
244288 |
+ context->x8 = (arch_addr_t) (uintptr_t) context->gregs.regs[8];
|
|
|
244288 |
+ /* See the comment above about the assert. */
|
|
|
244288 |
+ assert(! "Unexpected: first argument passed on stack.");
|
|
|
244288 |
+ abort();
|
|
|
244288 |
+ }
|
|
|
244288 |
+
|
|
|
244288 |
+ return context;
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+int
|
|
|
244288 |
+arch_fetch_arg_next(struct fetch_context *context, enum tof type,
|
|
|
244288 |
+ struct process *proc, struct arg_type_info *info,
|
|
|
244288 |
+ struct value *value)
|
|
|
244288 |
+{
|
|
|
244288 |
+ return fetch_arg(context, proc, info, value,
|
|
|
244288 |
+ pass_arg(context, proc, info));
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+int
|
|
|
244288 |
+arch_fetch_retval(struct fetch_context *context, enum tof type,
|
|
|
244288 |
+ struct process *proc, struct arg_type_info *info,
|
|
|
244288 |
+ struct value *value)
|
|
|
244288 |
+{
|
|
|
244288 |
+ if (context->x8 != 0) {
|
|
|
244288 |
+ value_in_inferior(value, context->x8);
|
|
|
244288 |
+ return 0;
|
|
|
244288 |
+ }
|
|
|
244288 |
+
|
|
|
244288 |
+ if (context_init(context, proc) < 0)
|
|
|
244288 |
+ return -1;
|
|
|
244288 |
+
|
|
|
244288 |
+ return fetch_arg(context, proc, info, value,
|
|
|
244288 |
+ pass_arg(context, proc, info));
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+void
|
|
|
244288 |
+arch_fetch_arg_done(struct fetch_context *context)
|
|
|
244288 |
+{
|
|
|
244288 |
+ if (context != NULL)
|
|
|
244288 |
+ free(context);
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+size_t
|
|
|
244288 |
+arch_type_sizeof(struct process *proc, struct arg_type_info *arg)
|
|
|
244288 |
+{
|
|
|
244288 |
+ return (size_t) -2;
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+size_t
|
|
|
244288 |
+arch_type_alignof(struct process *proc, struct arg_type_info *arg)
|
|
|
244288 |
+{
|
|
|
244288 |
+ return (size_t) -2;
|
|
|
244288 |
+}
|
|
|
244288 |
diff --git a/sysdeps/linux-gnu/aarch64/plt.c b/sysdeps/linux-gnu/aarch64/plt.c
|
|
|
244288 |
new file mode 100644
|
|
|
244288 |
index 0000000..29dc4c9
|
|
|
244288 |
--- /dev/null
|
|
|
244288 |
+++ b/sysdeps/linux-gnu/aarch64/plt.c
|
|
|
244288 |
@@ -0,0 +1,38 @@
|
|
|
244288 |
+/*
|
|
|
244288 |
+ * This file is part of ltrace.
|
|
|
244288 |
+ * Copyright (C) 2014 Petr Machata, Red Hat, Inc.
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * This program is free software; you can redistribute it and/or
|
|
|
244288 |
+ * modify it under the terms of the GNU General Public License as
|
|
|
244288 |
+ * published by the Free Software Foundation; either version 2 of the
|
|
|
244288 |
+ * License, or (at your option) any later version.
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * This program is distributed in the hope that it will be useful, but
|
|
|
244288 |
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
244288 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
244288 |
+ * General Public License for more details.
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * You should have received a copy of the GNU General Public License
|
|
|
244288 |
+ * along with this program; if not, write to the Free Software
|
|
|
244288 |
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
|
244288 |
+ * 02110-1301 USA
|
|
|
244288 |
+ */
|
|
|
244288 |
+
|
|
|
244288 |
+#include <gelf.h>
|
|
|
244288 |
+
|
|
|
244288 |
+#include "backend.h"
|
|
|
244288 |
+#include "proc.h"
|
|
|
244288 |
+#include "library.h"
|
|
|
244288 |
+#include "ltrace-elf.h"
|
|
|
244288 |
+
|
|
|
244288 |
+arch_addr_t
|
|
|
244288 |
+sym2addr(struct process *proc, struct library_symbol *sym)
|
|
|
244288 |
+{
|
|
|
244288 |
+ return sym->enter_addr;
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+GElf_Addr
|
|
|
244288 |
+arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela *rela)
|
|
|
244288 |
+{
|
|
|
244288 |
+ return lte->plt_addr + 32 + ndx * 16;
|
|
|
244288 |
+}
|
|
|
244288 |
diff --git a/sysdeps/linux-gnu/aarch64/ptrace.h b/sysdeps/linux-gnu/aarch64/ptrace.h
|
|
|
244288 |
new file mode 100644
|
|
|
244288 |
index 0000000..283c314
|
|
|
244288 |
--- /dev/null
|
|
|
244288 |
+++ b/sysdeps/linux-gnu/aarch64/ptrace.h
|
|
|
244288 |
@@ -0,0 +1,22 @@
|
|
|
244288 |
+/*
|
|
|
244288 |
+ * This file is part of ltrace.
|
|
|
244288 |
+ * Copyright (C) 2014 Petr Machata, Red Hat, Inc.
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * This program is free software; you can redistribute it and/or
|
|
|
244288 |
+ * modify it under the terms of the GNU General Public License as
|
|
|
244288 |
+ * published by the Free Software Foundation; either version 2 of the
|
|
|
244288 |
+ * License, or (at your option) any later version.
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * This program is distributed in the hope that it will be useful, but
|
|
|
244288 |
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
244288 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
244288 |
+ * General Public License for more details.
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * You should have received a copy of the GNU General Public License
|
|
|
244288 |
+ * along with this program; if not, write to the Free Software
|
|
|
244288 |
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
|
244288 |
+ * 02110-1301 USA
|
|
|
244288 |
+ */
|
|
|
244288 |
+
|
|
|
244288 |
+#include <sys/ptrace.h>
|
|
|
244288 |
+#include <asm/ptrace.h>
|
|
|
244288 |
diff --git a/sysdeps/linux-gnu/aarch64/regs.c b/sysdeps/linux-gnu/aarch64/regs.c
|
|
|
244288 |
new file mode 100644
|
|
|
244288 |
index 0000000..06eb72b
|
|
|
244288 |
--- /dev/null
|
|
|
244288 |
+++ b/sysdeps/linux-gnu/aarch64/regs.c
|
|
|
244288 |
@@ -0,0 +1,130 @@
|
|
|
244288 |
+/*
|
|
|
244288 |
+ * This file is part of ltrace.
|
|
|
244288 |
+ * Copyright (C) 2014 Petr Machata, Red Hat, Inc.
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * This program is free software; you can redistribute it and/or
|
|
|
244288 |
+ * modify it under the terms of the GNU General Public License as
|
|
|
244288 |
+ * published by the Free Software Foundation; either version 2 of the
|
|
|
244288 |
+ * License, or (at your option) any later version.
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * This program is distributed in the hope that it will be useful, but
|
|
|
244288 |
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
244288 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
244288 |
+ * General Public License for more details.
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * You should have received a copy of the GNU General Public License
|
|
|
244288 |
+ * along with this program; if not, write to the Free Software
|
|
|
244288 |
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
|
244288 |
+ * 02110-1301 USA
|
|
|
244288 |
+ */
|
|
|
244288 |
+
|
|
|
244288 |
+#include <sys/ptrace.h>
|
|
|
244288 |
+#include <asm/ptrace.h>
|
|
|
244288 |
+#include <linux/uio.h>
|
|
|
244288 |
+#include <assert.h>
|
|
|
244288 |
+#include <stdlib.h>
|
|
|
244288 |
+
|
|
|
244288 |
+#include "backend.h"
|
|
|
244288 |
+#include "proc.h"
|
|
|
244288 |
+
|
|
|
244288 |
+#define PC_OFF (32 * 4)
|
|
|
244288 |
+
|
|
|
244288 |
+int
|
|
|
244288 |
+aarch64_read_gregs(struct process *proc, struct user_pt_regs *regs)
|
|
|
244288 |
+{
|
|
|
244288 |
+ *regs = (struct user_pt_regs) {};
|
|
|
244288 |
+ struct iovec iovec;
|
|
|
244288 |
+ iovec.iov_base = regs;
|
|
|
244288 |
+ iovec.iov_len = sizeof *regs;
|
|
|
244288 |
+ return ptrace(PTRACE_GETREGSET, proc->pid, NT_PRSTATUS, &iovec) < 0
|
|
|
244288 |
+ ? -1 : 0;
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+int
|
|
|
244288 |
+aarch64_write_gregs(struct process *proc, struct user_pt_regs *regs)
|
|
|
244288 |
+{
|
|
|
244288 |
+ struct iovec iovec;
|
|
|
244288 |
+ iovec.iov_base = regs;
|
|
|
244288 |
+ iovec.iov_len = sizeof *regs;
|
|
|
244288 |
+ return ptrace(PTRACE_SETREGSET, proc->pid, NT_PRSTATUS, &iovec) < 0
|
|
|
244288 |
+ ? -1 : 0;
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+int
|
|
|
244288 |
+aarch64_read_fregs(struct process *proc, struct user_fpsimd_state *regs)
|
|
|
244288 |
+{
|
|
|
244288 |
+ *regs = (struct user_fpsimd_state) {};
|
|
|
244288 |
+ struct iovec iovec;
|
|
|
244288 |
+ iovec.iov_base = regs;
|
|
|
244288 |
+ iovec.iov_len = sizeof *regs;
|
|
|
244288 |
+ return ptrace(PTRACE_GETREGSET, proc->pid, NT_FPREGSET, &iovec) < 0
|
|
|
244288 |
+ ? -1 : 0;
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+arch_addr_t
|
|
|
244288 |
+get_instruction_pointer(struct process *proc)
|
|
|
244288 |
+{
|
|
|
244288 |
+ struct user_pt_regs regs;
|
|
|
244288 |
+ if (aarch64_read_gregs(proc, ®s) < 0) {
|
|
|
244288 |
+ fprintf(stderr, "get_instruction_pointer: "
|
|
|
244288 |
+ "Couldn't read registers of %d.\n", proc->pid);
|
|
|
244288 |
+ return 0;
|
|
|
244288 |
+ }
|
|
|
244288 |
+
|
|
|
244288 |
+ /*
|
|
|
244288 |
+ char buf[128];
|
|
|
244288 |
+ sprintf(buf, "cat /proc/%d/maps", proc->pid);
|
|
|
244288 |
+ system(buf);
|
|
|
244288 |
+ */
|
|
|
244288 |
+
|
|
|
244288 |
+ /* XXX double cast */
|
|
|
244288 |
+ return (arch_addr_t) (uintptr_t) regs.pc;
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+void
|
|
|
244288 |
+set_instruction_pointer(struct process *proc, arch_addr_t addr)
|
|
|
244288 |
+{
|
|
|
244288 |
+ struct user_pt_regs regs;
|
|
|
244288 |
+ if (aarch64_read_gregs(proc, ®s) < 0) {
|
|
|
244288 |
+ fprintf(stderr, "get_instruction_pointer: "
|
|
|
244288 |
+ "Couldn't read registers of %d.\n", proc->pid);
|
|
|
244288 |
+ return;
|
|
|
244288 |
+ }
|
|
|
244288 |
+
|
|
|
244288 |
+ /* XXX double cast */
|
|
|
244288 |
+ regs.pc = (uint64_t) (uintptr_t) addr;
|
|
|
244288 |
+
|
|
|
244288 |
+ if (aarch64_write_gregs(proc, ®s) < 0) {
|
|
|
244288 |
+ fprintf(stderr, "get_instruction_pointer: "
|
|
|
244288 |
+ "Couldn't write registers of %d.\n", proc->pid);
|
|
|
244288 |
+ return;
|
|
|
244288 |
+ }
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+arch_addr_t
|
|
|
244288 |
+get_stack_pointer(struct process *proc)
|
|
|
244288 |
+{
|
|
|
244288 |
+ struct user_pt_regs regs;
|
|
|
244288 |
+ if (aarch64_read_gregs(proc, ®s) < 0) {
|
|
|
244288 |
+ fprintf(stderr, "get_stack_pointer: "
|
|
|
244288 |
+ "Couldn't read registers of %d.\n", proc->pid);
|
|
|
244288 |
+ return 0;
|
|
|
244288 |
+ }
|
|
|
244288 |
+
|
|
|
244288 |
+ /* XXX double cast */
|
|
|
244288 |
+ return (arch_addr_t) (uintptr_t) regs.sp;
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+arch_addr_t
|
|
|
244288 |
+get_return_addr(struct process *proc, arch_addr_t stack_pointer)
|
|
|
244288 |
+{
|
|
|
244288 |
+ struct user_pt_regs regs;
|
|
|
244288 |
+ if (aarch64_read_gregs(proc, ®s) < 0) {
|
|
|
244288 |
+ fprintf(stderr, "get_return_addr: "
|
|
|
244288 |
+ "Couldn't read registers of %d.\n", proc->pid);
|
|
|
244288 |
+ return 0;
|
|
|
244288 |
+ }
|
|
|
244288 |
+
|
|
|
244288 |
+ /* XXX double cast */
|
|
|
244288 |
+ return (arch_addr_t) (uintptr_t) regs.regs[30];
|
|
|
244288 |
+}
|
|
|
244288 |
diff --git a/sysdeps/linux-gnu/aarch64/signalent.h b/sysdeps/linux-gnu/aarch64/signalent.h
|
|
|
244288 |
new file mode 100644
|
|
|
244288 |
index 0000000..bf56ebc
|
|
|
244288 |
--- /dev/null
|
|
|
244288 |
+++ b/sysdeps/linux-gnu/aarch64/signalent.h
|
|
|
244288 |
@@ -0,0 +1,52 @@
|
|
|
244288 |
+/*
|
|
|
244288 |
+ * This file is part of ltrace.
|
|
|
244288 |
+ * Copyright (C) 2006 Ian Wienand
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * This program is free software; you can redistribute it and/or
|
|
|
244288 |
+ * modify it under the terms of the GNU General Public License as
|
|
|
244288 |
+ * published by the Free Software Foundation; either version 2 of the
|
|
|
244288 |
+ * License, or (at your option) any later version.
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * This program is distributed in the hope that it will be useful, but
|
|
|
244288 |
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
244288 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
244288 |
+ * General Public License for more details.
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * You should have received a copy of the GNU General Public License
|
|
|
244288 |
+ * along with this program; if not, write to the Free Software
|
|
|
244288 |
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
|
244288 |
+ * 02110-1301 USA
|
|
|
244288 |
+ */
|
|
|
244288 |
+
|
|
|
244288 |
+ "SIG_0", /* 0 */
|
|
|
244288 |
+ "SIGHUP", /* 1 */
|
|
|
244288 |
+ "SIGINT", /* 2 */
|
|
|
244288 |
+ "SIGQUIT", /* 3 */
|
|
|
244288 |
+ "SIGILL", /* 4 */
|
|
|
244288 |
+ "SIGTRAP", /* 5 */
|
|
|
244288 |
+ "SIGABRT", /* 6 */
|
|
|
244288 |
+ "SIGBUS", /* 7 */
|
|
|
244288 |
+ "SIGFPE", /* 8 */
|
|
|
244288 |
+ "SIGKILL", /* 9 */
|
|
|
244288 |
+ "SIGUSR1", /* 10 */
|
|
|
244288 |
+ "SIGSEGV", /* 11 */
|
|
|
244288 |
+ "SIGUSR2", /* 12 */
|
|
|
244288 |
+ "SIGPIPE", /* 13 */
|
|
|
244288 |
+ "SIGALRM", /* 14 */
|
|
|
244288 |
+ "SIGTERM", /* 15 */
|
|
|
244288 |
+ "SIGSTKFLT", /* 16 */
|
|
|
244288 |
+ "SIGCHLD", /* 17 */
|
|
|
244288 |
+ "SIGCONT", /* 18 */
|
|
|
244288 |
+ "SIGSTOP", /* 19 */
|
|
|
244288 |
+ "SIGTSTP", /* 20 */
|
|
|
244288 |
+ "SIGTTIN", /* 21 */
|
|
|
244288 |
+ "SIGTTOU", /* 22 */
|
|
|
244288 |
+ "SIGURG", /* 23 */
|
|
|
244288 |
+ "SIGXCPU", /* 24 */
|
|
|
244288 |
+ "SIGXFSZ", /* 25 */
|
|
|
244288 |
+ "SIGVTALRM", /* 26 */
|
|
|
244288 |
+ "SIGPROF", /* 27 */
|
|
|
244288 |
+ "SIGWINCH", /* 28 */
|
|
|
244288 |
+ "SIGIO", /* 29 */
|
|
|
244288 |
+ "SIGPWR", /* 30 */
|
|
|
244288 |
+ "SIGSYS", /* 31 */
|
|
|
244288 |
diff --git a/sysdeps/linux-gnu/aarch64/syscallent.h b/sysdeps/linux-gnu/aarch64/syscallent.h
|
|
|
244288 |
new file mode 100644
|
|
|
244288 |
index 0000000..aca8191
|
|
|
244288 |
--- /dev/null
|
|
|
244288 |
+++ b/sysdeps/linux-gnu/aarch64/syscallent.h
|
|
|
244288 |
@@ -0,0 +1,1100 @@
|
|
|
244288 |
+/*
|
|
|
244288 |
+ * This file is part of ltrace.
|
|
|
244288 |
+ * Copyright (C) 2014 Petr Machata, Red Hat, Inc.
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * This program is free software; you can redistribute it and/or
|
|
|
244288 |
+ * modify it under the terms of the GNU General Public License as
|
|
|
244288 |
+ * published by the Free Software Foundation; either version 2 of the
|
|
|
244288 |
+ * License, or (at your option) any later version.
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * This program is distributed in the hope that it will be useful, but
|
|
|
244288 |
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
244288 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
244288 |
+ * General Public License for more details.
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * You should have received a copy of the GNU General Public License
|
|
|
244288 |
+ * along with this program; if not, write to the Free Software
|
|
|
244288 |
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
|
244288 |
+ * 02110-1301 USA
|
|
|
244288 |
+ */
|
|
|
244288 |
+
|
|
|
244288 |
+ "io_setup", /* 0 */
|
|
|
244288 |
+ "io_destroy", /* 1 */
|
|
|
244288 |
+ "io_submit", /* 2 */
|
|
|
244288 |
+ "io_cancel", /* 3 */
|
|
|
244288 |
+ "io_getevents", /* 4 */
|
|
|
244288 |
+ "setxattr", /* 5 */
|
|
|
244288 |
+ "lsetxattr", /* 6 */
|
|
|
244288 |
+ "fsetxattr", /* 7 */
|
|
|
244288 |
+ "getxattr", /* 8 */
|
|
|
244288 |
+ "lgetxattr", /* 9 */
|
|
|
244288 |
+ "fgetxattr", /* 10 */
|
|
|
244288 |
+ "listxattr", /* 11 */
|
|
|
244288 |
+ "llistxattr", /* 12 */
|
|
|
244288 |
+ "flistxattr", /* 13 */
|
|
|
244288 |
+ "removexattr", /* 14 */
|
|
|
244288 |
+ "lremovexattr", /* 15 */
|
|
|
244288 |
+ "fremovexattr", /* 16 */
|
|
|
244288 |
+ "getcwd", /* 17 */
|
|
|
244288 |
+ "lookup_dcookie", /* 18 */
|
|
|
244288 |
+ "eventfd2", /* 19 */
|
|
|
244288 |
+ "epoll_create1", /* 20 */
|
|
|
244288 |
+ "epoll_ctl", /* 21 */
|
|
|
244288 |
+ "epoll_pwait", /* 22 */
|
|
|
244288 |
+ "dup", /* 23 */
|
|
|
244288 |
+ "dup3", /* 24 */
|
|
|
244288 |
+ "fcntl", /* 25 */
|
|
|
244288 |
+ "inotify_init1", /* 26 */
|
|
|
244288 |
+ "inotify_add_watch", /* 27 */
|
|
|
244288 |
+ "inotify_rm_watch", /* 28 */
|
|
|
244288 |
+ "ioctl", /* 29 */
|
|
|
244288 |
+ "ioprio_set", /* 30 */
|
|
|
244288 |
+ "ioprio_get", /* 31 */
|
|
|
244288 |
+ "flock", /* 32 */
|
|
|
244288 |
+ "mknodat", /* 33 */
|
|
|
244288 |
+ "mkdirat", /* 34 */
|
|
|
244288 |
+ "unlinkat", /* 35 */
|
|
|
244288 |
+ "symlinkat", /* 36 */
|
|
|
244288 |
+ "linkat", /* 37 */
|
|
|
244288 |
+ "renameat", /* 38 */
|
|
|
244288 |
+ "umount2", /* 39 */
|
|
|
244288 |
+ "mount", /* 40 */
|
|
|
244288 |
+ "pivot_root", /* 41 */
|
|
|
244288 |
+ "nfsservctl", /* 42 */
|
|
|
244288 |
+ "statfs", /* 43 */
|
|
|
244288 |
+ "fstatfs", /* 44 */
|
|
|
244288 |
+ "truncate", /* 45 */
|
|
|
244288 |
+ "ftruncate", /* 46 */
|
|
|
244288 |
+ "fallocate", /* 47 */
|
|
|
244288 |
+ "faccessat", /* 48 */
|
|
|
244288 |
+ "chdir", /* 49 */
|
|
|
244288 |
+ "fchdir", /* 50 */
|
|
|
244288 |
+ "chroot", /* 51 */
|
|
|
244288 |
+ "fchmod", /* 52 */
|
|
|
244288 |
+ "fchmodat", /* 53 */
|
|
|
244288 |
+ "fchownat", /* 54 */
|
|
|
244288 |
+ "fchown", /* 55 */
|
|
|
244288 |
+ "openat", /* 56 */
|
|
|
244288 |
+ "close", /* 57 */
|
|
|
244288 |
+ "vhangup", /* 58 */
|
|
|
244288 |
+ "pipe2", /* 59 */
|
|
|
244288 |
+ "quotactl", /* 60 */
|
|
|
244288 |
+ "getdents64", /* 61 */
|
|
|
244288 |
+ "lseek", /* 62 */
|
|
|
244288 |
+ "read", /* 63 */
|
|
|
244288 |
+ "write", /* 64 */
|
|
|
244288 |
+ "readv", /* 65 */
|
|
|
244288 |
+ "writev", /* 66 */
|
|
|
244288 |
+ "pread64", /* 67 */
|
|
|
244288 |
+ "pwrite64", /* 68 */
|
|
|
244288 |
+ "preadv", /* 69 */
|
|
|
244288 |
+ "pwritev", /* 70 */
|
|
|
244288 |
+ "sendfile", /* 71 */
|
|
|
244288 |
+ "pselect6", /* 72 */
|
|
|
244288 |
+ "ppoll", /* 73 */
|
|
|
244288 |
+ "signalfd4", /* 74 */
|
|
|
244288 |
+ "vmsplice", /* 75 */
|
|
|
244288 |
+ "splice", /* 76 */
|
|
|
244288 |
+ "tee", /* 77 */
|
|
|
244288 |
+ "readlinkat", /* 78 */
|
|
|
244288 |
+ "fstatat", /* 79 */
|
|
|
244288 |
+ "fstat", /* 80 */
|
|
|
244288 |
+ "sync", /* 81 */
|
|
|
244288 |
+ "fsync", /* 82 */
|
|
|
244288 |
+ "fdatasync", /* 83 */
|
|
|
244288 |
+ "sync_file_range", /* 84 */
|
|
|
244288 |
+ "timerfd_create", /* 85 */
|
|
|
244288 |
+ "timerfd_settime", /* 86 */
|
|
|
244288 |
+ "timerfd_gettime", /* 87 */
|
|
|
244288 |
+ "utimensat", /* 88 */
|
|
|
244288 |
+ "acct", /* 89 */
|
|
|
244288 |
+ "capget", /* 90 */
|
|
|
244288 |
+ "capset", /* 91 */
|
|
|
244288 |
+ "personality", /* 92 */
|
|
|
244288 |
+ "exit", /* 93 */
|
|
|
244288 |
+ "exit_group", /* 94 */
|
|
|
244288 |
+ "waitid", /* 95 */
|
|
|
244288 |
+ "set_tid_address", /* 96 */
|
|
|
244288 |
+ "unshare", /* 97 */
|
|
|
244288 |
+ "futex", /* 98 */
|
|
|
244288 |
+ "set_robust_list", /* 99 */
|
|
|
244288 |
+ "get_robust_list", /* 100 */
|
|
|
244288 |
+ "nanosleep", /* 101 */
|
|
|
244288 |
+ "getitimer", /* 102 */
|
|
|
244288 |
+ "setitimer", /* 103 */
|
|
|
244288 |
+ "kexec_load", /* 104 */
|
|
|
244288 |
+ "init_module", /* 105 */
|
|
|
244288 |
+ "delete_module", /* 106 */
|
|
|
244288 |
+ "timer_create", /* 107 */
|
|
|
244288 |
+ "timer_gettime", /* 108 */
|
|
|
244288 |
+ "timer_getoverrun", /* 109 */
|
|
|
244288 |
+ "timer_settime", /* 110 */
|
|
|
244288 |
+ "timer_delete", /* 111 */
|
|
|
244288 |
+ "clock_settime", /* 112 */
|
|
|
244288 |
+ "clock_gettime", /* 113 */
|
|
|
244288 |
+ "clock_getres", /* 114 */
|
|
|
244288 |
+ "clock_nanosleep", /* 115 */
|
|
|
244288 |
+ "syslog", /* 116 */
|
|
|
244288 |
+ "ptrace", /* 117 */
|
|
|
244288 |
+ "sched_setparam", /* 118 */
|
|
|
244288 |
+ "sched_setscheduler", /* 119 */
|
|
|
244288 |
+ "sched_getscheduler", /* 120 */
|
|
|
244288 |
+ "sched_getparam", /* 121 */
|
|
|
244288 |
+ "sched_setaffinity", /* 122 */
|
|
|
244288 |
+ "sched_getaffinity", /* 123 */
|
|
|
244288 |
+ "sched_yield", /* 124 */
|
|
|
244288 |
+ "sched_get_priority_max", /* 125 */
|
|
|
244288 |
+ "sched_get_priority_min", /* 126 */
|
|
|
244288 |
+ "sched_rr_get_interval", /* 127 */
|
|
|
244288 |
+ "restart_syscall", /* 128 */
|
|
|
244288 |
+ "kill", /* 129 */
|
|
|
244288 |
+ "tkill", /* 130 */
|
|
|
244288 |
+ "tgkill", /* 131 */
|
|
|
244288 |
+ "sigaltstack", /* 132 */
|
|
|
244288 |
+ "rt_sigsuspend", /* 133 */
|
|
|
244288 |
+ "rt_sigaction", /* 134 */
|
|
|
244288 |
+ "rt_sigprocmask", /* 135 */
|
|
|
244288 |
+ "rt_sigpending", /* 136 */
|
|
|
244288 |
+ "rt_sigtimedwait", /* 137 */
|
|
|
244288 |
+ "rt_sigqueueinfo", /* 138 */
|
|
|
244288 |
+ "rt_sigreturn", /* 139 */
|
|
|
244288 |
+ "setpriority", /* 140 */
|
|
|
244288 |
+ "getpriority", /* 141 */
|
|
|
244288 |
+ "reboot", /* 142 */
|
|
|
244288 |
+ "setregid", /* 143 */
|
|
|
244288 |
+ "setgid", /* 144 */
|
|
|
244288 |
+ "setreuid", /* 145 */
|
|
|
244288 |
+ "setuid", /* 146 */
|
|
|
244288 |
+ "setresuid", /* 147 */
|
|
|
244288 |
+ "getresuid", /* 148 */
|
|
|
244288 |
+ "setresgid", /* 149 */
|
|
|
244288 |
+ "getresgid", /* 150 */
|
|
|
244288 |
+ "setfsuid", /* 151 */
|
|
|
244288 |
+ "setfsgid", /* 152 */
|
|
|
244288 |
+ "times", /* 153 */
|
|
|
244288 |
+ "setpgid", /* 154 */
|
|
|
244288 |
+ "getpgid", /* 155 */
|
|
|
244288 |
+ "getsid", /* 156 */
|
|
|
244288 |
+ "setsid", /* 157 */
|
|
|
244288 |
+ "getgroups", /* 158 */
|
|
|
244288 |
+ "setgroups", /* 159 */
|
|
|
244288 |
+ "uname", /* 160 */
|
|
|
244288 |
+ "sethostname", /* 161 */
|
|
|
244288 |
+ "setdomainname", /* 162 */
|
|
|
244288 |
+ "getrlimit", /* 163 */
|
|
|
244288 |
+ "setrlimit", /* 164 */
|
|
|
244288 |
+ "getrusage", /* 165 */
|
|
|
244288 |
+ "umask", /* 166 */
|
|
|
244288 |
+ "prctl", /* 167 */
|
|
|
244288 |
+ "getcpu", /* 168 */
|
|
|
244288 |
+ "gettimeofday", /* 169 */
|
|
|
244288 |
+ "settimeofday", /* 170 */
|
|
|
244288 |
+ "adjtimex", /* 171 */
|
|
|
244288 |
+ "getpid", /* 172 */
|
|
|
244288 |
+ "getppid", /* 173 */
|
|
|
244288 |
+ "getuid", /* 174 */
|
|
|
244288 |
+ "geteuid", /* 175 */
|
|
|
244288 |
+ "getgid", /* 176 */
|
|
|
244288 |
+ "getegid", /* 177 */
|
|
|
244288 |
+ "gettid", /* 178 */
|
|
|
244288 |
+ "sysinfo", /* 179 */
|
|
|
244288 |
+ "mq_open", /* 180 */
|
|
|
244288 |
+ "mq_unlink", /* 181 */
|
|
|
244288 |
+ "mq_timedsend", /* 182 */
|
|
|
244288 |
+ "mq_timedreceive", /* 183 */
|
|
|
244288 |
+ "mq_notify", /* 184 */
|
|
|
244288 |
+ "mq_getsetattr", /* 185 */
|
|
|
244288 |
+ "msgget", /* 186 */
|
|
|
244288 |
+ "msgctl", /* 187 */
|
|
|
244288 |
+ "msgrcv", /* 188 */
|
|
|
244288 |
+ "msgsnd", /* 189 */
|
|
|
244288 |
+ "semget", /* 190 */
|
|
|
244288 |
+ "semctl", /* 191 */
|
|
|
244288 |
+ "semtimedop", /* 192 */
|
|
|
244288 |
+ "semop", /* 193 */
|
|
|
244288 |
+ "shmget", /* 194 */
|
|
|
244288 |
+ "shmctl", /* 195 */
|
|
|
244288 |
+ "shmat", /* 196 */
|
|
|
244288 |
+ "shmdt", /* 197 */
|
|
|
244288 |
+ "socket", /* 198 */
|
|
|
244288 |
+ "socketpair", /* 199 */
|
|
|
244288 |
+ "bind", /* 200 */
|
|
|
244288 |
+ "listen", /* 201 */
|
|
|
244288 |
+ "accept", /* 202 */
|
|
|
244288 |
+ "connect", /* 203 */
|
|
|
244288 |
+ "getsockname", /* 204 */
|
|
|
244288 |
+ "getpeername", /* 205 */
|
|
|
244288 |
+ "sendto", /* 206 */
|
|
|
244288 |
+ "recvfrom", /* 207 */
|
|
|
244288 |
+ "setsockopt", /* 208 */
|
|
|
244288 |
+ "getsockopt", /* 209 */
|
|
|
244288 |
+ "shutdown", /* 210 */
|
|
|
244288 |
+ "sendmsg", /* 211 */
|
|
|
244288 |
+ "recvmsg", /* 212 */
|
|
|
244288 |
+ "readahead", /* 213 */
|
|
|
244288 |
+ "brk", /* 214 */
|
|
|
244288 |
+ "munmap", /* 215 */
|
|
|
244288 |
+ "mremap", /* 216 */
|
|
|
244288 |
+ "add_key", /* 217 */
|
|
|
244288 |
+ "request_key", /* 218 */
|
|
|
244288 |
+ "keyctl", /* 219 */
|
|
|
244288 |
+ "clone", /* 220 */
|
|
|
244288 |
+ "execve", /* 221 */
|
|
|
244288 |
+ "mmap", /* 222 */
|
|
|
244288 |
+ "fadvise64", /* 223 */
|
|
|
244288 |
+ "swapon", /* 224 */
|
|
|
244288 |
+ "swapoff", /* 225 */
|
|
|
244288 |
+ "mprotect", /* 226 */
|
|
|
244288 |
+ "msync", /* 227 */
|
|
|
244288 |
+ "mlock", /* 228 */
|
|
|
244288 |
+ "munlock", /* 229 */
|
|
|
244288 |
+ "mlockall", /* 230 */
|
|
|
244288 |
+ "munlockall", /* 231 */
|
|
|
244288 |
+ "mincore", /* 232 */
|
|
|
244288 |
+ "madvise", /* 233 */
|
|
|
244288 |
+ "remap_file_pages", /* 234 */
|
|
|
244288 |
+ "mbind", /* 235 */
|
|
|
244288 |
+ "get_mempolicy", /* 236 */
|
|
|
244288 |
+ "set_mempolicy", /* 237 */
|
|
|
244288 |
+ "migrate_pages", /* 238 */
|
|
|
244288 |
+ "move_pages", /* 239 */
|
|
|
244288 |
+ "rt_tgsigqueueinfo", /* 240 */
|
|
|
244288 |
+ "perf_event_open", /* 241 */
|
|
|
244288 |
+ "accept4", /* 242 */
|
|
|
244288 |
+ "recvmmsg", /* 243 */
|
|
|
244288 |
+ "arch_specific_syscall", /* 244 */
|
|
|
244288 |
+ "245", /* 245 */
|
|
|
244288 |
+ "246", /* 246 */
|
|
|
244288 |
+ "247", /* 247 */
|
|
|
244288 |
+ "248", /* 248 */
|
|
|
244288 |
+ "249", /* 249 */
|
|
|
244288 |
+ "250", /* 250 */
|
|
|
244288 |
+ "251", /* 251 */
|
|
|
244288 |
+ "252", /* 252 */
|
|
|
244288 |
+ "253", /* 253 */
|
|
|
244288 |
+ "254", /* 254 */
|
|
|
244288 |
+ "255", /* 255 */
|
|
|
244288 |
+ "256", /* 256 */
|
|
|
244288 |
+ "257", /* 257 */
|
|
|
244288 |
+ "258", /* 258 */
|
|
|
244288 |
+ "259", /* 259 */
|
|
|
244288 |
+ "wait4", /* 260 */
|
|
|
244288 |
+ "prlimit64", /* 261 */
|
|
|
244288 |
+ "fanotify_init", /* 262 */
|
|
|
244288 |
+ "fanotify_mark", /* 263 */
|
|
|
244288 |
+ "name_to_handle_at", /* 264 */
|
|
|
244288 |
+ "open_by_handle_at", /* 265 */
|
|
|
244288 |
+ "clock_adjtime", /* 266 */
|
|
|
244288 |
+ "syncfs", /* 267 */
|
|
|
244288 |
+ "setns", /* 268 */
|
|
|
244288 |
+ "sendmmsg", /* 269 */
|
|
|
244288 |
+ "process_vm_readv", /* 270 */
|
|
|
244288 |
+ "process_vm_writev", /* 271 */
|
|
|
244288 |
+ "kcmp", /* 272 */
|
|
|
244288 |
+ "finit_module", /* 273 */
|
|
|
244288 |
+ "syscalls", /* 274 */
|
|
|
244288 |
+ "275", /* 275 */
|
|
|
244288 |
+ "276", /* 276 */
|
|
|
244288 |
+ "277", /* 277 */
|
|
|
244288 |
+ "278", /* 278 */
|
|
|
244288 |
+ "279", /* 279 */
|
|
|
244288 |
+ "280", /* 280 */
|
|
|
244288 |
+ "281", /* 281 */
|
|
|
244288 |
+ "282", /* 282 */
|
|
|
244288 |
+ "283", /* 283 */
|
|
|
244288 |
+ "284", /* 284 */
|
|
|
244288 |
+ "285", /* 285 */
|
|
|
244288 |
+ "286", /* 286 */
|
|
|
244288 |
+ "287", /* 287 */
|
|
|
244288 |
+ "288", /* 288 */
|
|
|
244288 |
+ "289", /* 289 */
|
|
|
244288 |
+ "290", /* 290 */
|
|
|
244288 |
+ "291", /* 291 */
|
|
|
244288 |
+ "292", /* 292 */
|
|
|
244288 |
+ "293", /* 293 */
|
|
|
244288 |
+ "294", /* 294 */
|
|
|
244288 |
+ "295", /* 295 */
|
|
|
244288 |
+ "296", /* 296 */
|
|
|
244288 |
+ "297", /* 297 */
|
|
|
244288 |
+ "298", /* 298 */
|
|
|
244288 |
+ "299", /* 299 */
|
|
|
244288 |
+ "300", /* 300 */
|
|
|
244288 |
+ "301", /* 301 */
|
|
|
244288 |
+ "302", /* 302 */
|
|
|
244288 |
+ "303", /* 303 */
|
|
|
244288 |
+ "304", /* 304 */
|
|
|
244288 |
+ "305", /* 305 */
|
|
|
244288 |
+ "306", /* 306 */
|
|
|
244288 |
+ "307", /* 307 */
|
|
|
244288 |
+ "308", /* 308 */
|
|
|
244288 |
+ "309", /* 309 */
|
|
|
244288 |
+ "310", /* 310 */
|
|
|
244288 |
+ "311", /* 311 */
|
|
|
244288 |
+ "312", /* 312 */
|
|
|
244288 |
+ "313", /* 313 */
|
|
|
244288 |
+ "314", /* 314 */
|
|
|
244288 |
+ "315", /* 315 */
|
|
|
244288 |
+ "316", /* 316 */
|
|
|
244288 |
+ "317", /* 317 */
|
|
|
244288 |
+ "318", /* 318 */
|
|
|
244288 |
+ "319", /* 319 */
|
|
|
244288 |
+ "320", /* 320 */
|
|
|
244288 |
+ "321", /* 321 */
|
|
|
244288 |
+ "322", /* 322 */
|
|
|
244288 |
+ "323", /* 323 */
|
|
|
244288 |
+ "324", /* 324 */
|
|
|
244288 |
+ "325", /* 325 */
|
|
|
244288 |
+ "326", /* 326 */
|
|
|
244288 |
+ "327", /* 327 */
|
|
|
244288 |
+ "328", /* 328 */
|
|
|
244288 |
+ "329", /* 329 */
|
|
|
244288 |
+ "330", /* 330 */
|
|
|
244288 |
+ "331", /* 331 */
|
|
|
244288 |
+ "332", /* 332 */
|
|
|
244288 |
+ "333", /* 333 */
|
|
|
244288 |
+ "334", /* 334 */
|
|
|
244288 |
+ "335", /* 335 */
|
|
|
244288 |
+ "336", /* 336 */
|
|
|
244288 |
+ "337", /* 337 */
|
|
|
244288 |
+ "338", /* 338 */
|
|
|
244288 |
+ "339", /* 339 */
|
|
|
244288 |
+ "340", /* 340 */
|
|
|
244288 |
+ "341", /* 341 */
|
|
|
244288 |
+ "342", /* 342 */
|
|
|
244288 |
+ "343", /* 343 */
|
|
|
244288 |
+ "344", /* 344 */
|
|
|
244288 |
+ "345", /* 345 */
|
|
|
244288 |
+ "346", /* 346 */
|
|
|
244288 |
+ "347", /* 347 */
|
|
|
244288 |
+ "348", /* 348 */
|
|
|
244288 |
+ "349", /* 349 */
|
|
|
244288 |
+ "350", /* 350 */
|
|
|
244288 |
+ "351", /* 351 */
|
|
|
244288 |
+ "352", /* 352 */
|
|
|
244288 |
+ "353", /* 353 */
|
|
|
244288 |
+ "354", /* 354 */
|
|
|
244288 |
+ "355", /* 355 */
|
|
|
244288 |
+ "356", /* 356 */
|
|
|
244288 |
+ "357", /* 357 */
|
|
|
244288 |
+ "358", /* 358 */
|
|
|
244288 |
+ "359", /* 359 */
|
|
|
244288 |
+ "360", /* 360 */
|
|
|
244288 |
+ "361", /* 361 */
|
|
|
244288 |
+ "362", /* 362 */
|
|
|
244288 |
+ "363", /* 363 */
|
|
|
244288 |
+ "364", /* 364 */
|
|
|
244288 |
+ "365", /* 365 */
|
|
|
244288 |
+ "366", /* 366 */
|
|
|
244288 |
+ "367", /* 367 */
|
|
|
244288 |
+ "368", /* 368 */
|
|
|
244288 |
+ "369", /* 369 */
|
|
|
244288 |
+ "370", /* 370 */
|
|
|
244288 |
+ "371", /* 371 */
|
|
|
244288 |
+ "372", /* 372 */
|
|
|
244288 |
+ "373", /* 373 */
|
|
|
244288 |
+ "374", /* 374 */
|
|
|
244288 |
+ "375", /* 375 */
|
|
|
244288 |
+ "376", /* 376 */
|
|
|
244288 |
+ "377", /* 377 */
|
|
|
244288 |
+ "378", /* 378 */
|
|
|
244288 |
+ "379", /* 379 */
|
|
|
244288 |
+ "380", /* 380 */
|
|
|
244288 |
+ "381", /* 381 */
|
|
|
244288 |
+ "382", /* 382 */
|
|
|
244288 |
+ "383", /* 383 */
|
|
|
244288 |
+ "384", /* 384 */
|
|
|
244288 |
+ "385", /* 385 */
|
|
|
244288 |
+ "386", /* 386 */
|
|
|
244288 |
+ "387", /* 387 */
|
|
|
244288 |
+ "388", /* 388 */
|
|
|
244288 |
+ "389", /* 389 */
|
|
|
244288 |
+ "390", /* 390 */
|
|
|
244288 |
+ "391", /* 391 */
|
|
|
244288 |
+ "392", /* 392 */
|
|
|
244288 |
+ "393", /* 393 */
|
|
|
244288 |
+ "394", /* 394 */
|
|
|
244288 |
+ "395", /* 395 */
|
|
|
244288 |
+ "396", /* 396 */
|
|
|
244288 |
+ "397", /* 397 */
|
|
|
244288 |
+ "398", /* 398 */
|
|
|
244288 |
+ "399", /* 399 */
|
|
|
244288 |
+ "400", /* 400 */
|
|
|
244288 |
+ "401", /* 401 */
|
|
|
244288 |
+ "402", /* 402 */
|
|
|
244288 |
+ "403", /* 403 */
|
|
|
244288 |
+ "404", /* 404 */
|
|
|
244288 |
+ "405", /* 405 */
|
|
|
244288 |
+ "406", /* 406 */
|
|
|
244288 |
+ "407", /* 407 */
|
|
|
244288 |
+ "408", /* 408 */
|
|
|
244288 |
+ "409", /* 409 */
|
|
|
244288 |
+ "410", /* 410 */
|
|
|
244288 |
+ "411", /* 411 */
|
|
|
244288 |
+ "412", /* 412 */
|
|
|
244288 |
+ "413", /* 413 */
|
|
|
244288 |
+ "414", /* 414 */
|
|
|
244288 |
+ "415", /* 415 */
|
|
|
244288 |
+ "416", /* 416 */
|
|
|
244288 |
+ "417", /* 417 */
|
|
|
244288 |
+ "418", /* 418 */
|
|
|
244288 |
+ "419", /* 419 */
|
|
|
244288 |
+ "420", /* 420 */
|
|
|
244288 |
+ "421", /* 421 */
|
|
|
244288 |
+ "422", /* 422 */
|
|
|
244288 |
+ "423", /* 423 */
|
|
|
244288 |
+ "424", /* 424 */
|
|
|
244288 |
+ "425", /* 425 */
|
|
|
244288 |
+ "426", /* 426 */
|
|
|
244288 |
+ "427", /* 427 */
|
|
|
244288 |
+ "428", /* 428 */
|
|
|
244288 |
+ "429", /* 429 */
|
|
|
244288 |
+ "430", /* 430 */
|
|
|
244288 |
+ "431", /* 431 */
|
|
|
244288 |
+ "432", /* 432 */
|
|
|
244288 |
+ "433", /* 433 */
|
|
|
244288 |
+ "434", /* 434 */
|
|
|
244288 |
+ "435", /* 435 */
|
|
|
244288 |
+ "436", /* 436 */
|
|
|
244288 |
+ "437", /* 437 */
|
|
|
244288 |
+ "438", /* 438 */
|
|
|
244288 |
+ "439", /* 439 */
|
|
|
244288 |
+ "440", /* 440 */
|
|
|
244288 |
+ "441", /* 441 */
|
|
|
244288 |
+ "442", /* 442 */
|
|
|
244288 |
+ "443", /* 443 */
|
|
|
244288 |
+ "444", /* 444 */
|
|
|
244288 |
+ "445", /* 445 */
|
|
|
244288 |
+ "446", /* 446 */
|
|
|
244288 |
+ "447", /* 447 */
|
|
|
244288 |
+ "448", /* 448 */
|
|
|
244288 |
+ "449", /* 449 */
|
|
|
244288 |
+ "450", /* 450 */
|
|
|
244288 |
+ "451", /* 451 */
|
|
|
244288 |
+ "452", /* 452 */
|
|
|
244288 |
+ "453", /* 453 */
|
|
|
244288 |
+ "454", /* 454 */
|
|
|
244288 |
+ "455", /* 455 */
|
|
|
244288 |
+ "456", /* 456 */
|
|
|
244288 |
+ "457", /* 457 */
|
|
|
244288 |
+ "458", /* 458 */
|
|
|
244288 |
+ "459", /* 459 */
|
|
|
244288 |
+ "460", /* 460 */
|
|
|
244288 |
+ "461", /* 461 */
|
|
|
244288 |
+ "462", /* 462 */
|
|
|
244288 |
+ "463", /* 463 */
|
|
|
244288 |
+ "464", /* 464 */
|
|
|
244288 |
+ "465", /* 465 */
|
|
|
244288 |
+ "466", /* 466 */
|
|
|
244288 |
+ "467", /* 467 */
|
|
|
244288 |
+ "468", /* 468 */
|
|
|
244288 |
+ "469", /* 469 */
|
|
|
244288 |
+ "470", /* 470 */
|
|
|
244288 |
+ "471", /* 471 */
|
|
|
244288 |
+ "472", /* 472 */
|
|
|
244288 |
+ "473", /* 473 */
|
|
|
244288 |
+ "474", /* 474 */
|
|
|
244288 |
+ "475", /* 475 */
|
|
|
244288 |
+ "476", /* 476 */
|
|
|
244288 |
+ "477", /* 477 */
|
|
|
244288 |
+ "478", /* 478 */
|
|
|
244288 |
+ "479", /* 479 */
|
|
|
244288 |
+ "480", /* 480 */
|
|
|
244288 |
+ "481", /* 481 */
|
|
|
244288 |
+ "482", /* 482 */
|
|
|
244288 |
+ "483", /* 483 */
|
|
|
244288 |
+ "484", /* 484 */
|
|
|
244288 |
+ "485", /* 485 */
|
|
|
244288 |
+ "486", /* 486 */
|
|
|
244288 |
+ "487", /* 487 */
|
|
|
244288 |
+ "488", /* 488 */
|
|
|
244288 |
+ "489", /* 489 */
|
|
|
244288 |
+ "490", /* 490 */
|
|
|
244288 |
+ "491", /* 491 */
|
|
|
244288 |
+ "492", /* 492 */
|
|
|
244288 |
+ "493", /* 493 */
|
|
|
244288 |
+ "494", /* 494 */
|
|
|
244288 |
+ "495", /* 495 */
|
|
|
244288 |
+ "496", /* 496 */
|
|
|
244288 |
+ "497", /* 497 */
|
|
|
244288 |
+ "498", /* 498 */
|
|
|
244288 |
+ "499", /* 499 */
|
|
|
244288 |
+ "500", /* 500 */
|
|
|
244288 |
+ "501", /* 501 */
|
|
|
244288 |
+ "502", /* 502 */
|
|
|
244288 |
+ "503", /* 503 */
|
|
|
244288 |
+ "504", /* 504 */
|
|
|
244288 |
+ "505", /* 505 */
|
|
|
244288 |
+ "506", /* 506 */
|
|
|
244288 |
+ "507", /* 507 */
|
|
|
244288 |
+ "508", /* 508 */
|
|
|
244288 |
+ "509", /* 509 */
|
|
|
244288 |
+ "510", /* 510 */
|
|
|
244288 |
+ "511", /* 511 */
|
|
|
244288 |
+ "512", /* 512 */
|
|
|
244288 |
+ "513", /* 513 */
|
|
|
244288 |
+ "514", /* 514 */
|
|
|
244288 |
+ "515", /* 515 */
|
|
|
244288 |
+ "516", /* 516 */
|
|
|
244288 |
+ "517", /* 517 */
|
|
|
244288 |
+ "518", /* 518 */
|
|
|
244288 |
+ "519", /* 519 */
|
|
|
244288 |
+ "520", /* 520 */
|
|
|
244288 |
+ "521", /* 521 */
|
|
|
244288 |
+ "522", /* 522 */
|
|
|
244288 |
+ "523", /* 523 */
|
|
|
244288 |
+ "524", /* 524 */
|
|
|
244288 |
+ "525", /* 525 */
|
|
|
244288 |
+ "526", /* 526 */
|
|
|
244288 |
+ "527", /* 527 */
|
|
|
244288 |
+ "528", /* 528 */
|
|
|
244288 |
+ "529", /* 529 */
|
|
|
244288 |
+ "530", /* 530 */
|
|
|
244288 |
+ "531", /* 531 */
|
|
|
244288 |
+ "532", /* 532 */
|
|
|
244288 |
+ "533", /* 533 */
|
|
|
244288 |
+ "534", /* 534 */
|
|
|
244288 |
+ "535", /* 535 */
|
|
|
244288 |
+ "536", /* 536 */
|
|
|
244288 |
+ "537", /* 537 */
|
|
|
244288 |
+ "538", /* 538 */
|
|
|
244288 |
+ "539", /* 539 */
|
|
|
244288 |
+ "540", /* 540 */
|
|
|
244288 |
+ "541", /* 541 */
|
|
|
244288 |
+ "542", /* 542 */
|
|
|
244288 |
+ "543", /* 543 */
|
|
|
244288 |
+ "544", /* 544 */
|
|
|
244288 |
+ "545", /* 545 */
|
|
|
244288 |
+ "546", /* 546 */
|
|
|
244288 |
+ "547", /* 547 */
|
|
|
244288 |
+ "548", /* 548 */
|
|
|
244288 |
+ "549", /* 549 */
|
|
|
244288 |
+ "550", /* 550 */
|
|
|
244288 |
+ "551", /* 551 */
|
|
|
244288 |
+ "552", /* 552 */
|
|
|
244288 |
+ "553", /* 553 */
|
|
|
244288 |
+ "554", /* 554 */
|
|
|
244288 |
+ "555", /* 555 */
|
|
|
244288 |
+ "556", /* 556 */
|
|
|
244288 |
+ "557", /* 557 */
|
|
|
244288 |
+ "558", /* 558 */
|
|
|
244288 |
+ "559", /* 559 */
|
|
|
244288 |
+ "560", /* 560 */
|
|
|
244288 |
+ "561", /* 561 */
|
|
|
244288 |
+ "562", /* 562 */
|
|
|
244288 |
+ "563", /* 563 */
|
|
|
244288 |
+ "564", /* 564 */
|
|
|
244288 |
+ "565", /* 565 */
|
|
|
244288 |
+ "566", /* 566 */
|
|
|
244288 |
+ "567", /* 567 */
|
|
|
244288 |
+ "568", /* 568 */
|
|
|
244288 |
+ "569", /* 569 */
|
|
|
244288 |
+ "570", /* 570 */
|
|
|
244288 |
+ "571", /* 571 */
|
|
|
244288 |
+ "572", /* 572 */
|
|
|
244288 |
+ "573", /* 573 */
|
|
|
244288 |
+ "574", /* 574 */
|
|
|
244288 |
+ "575", /* 575 */
|
|
|
244288 |
+ "576", /* 576 */
|
|
|
244288 |
+ "577", /* 577 */
|
|
|
244288 |
+ "578", /* 578 */
|
|
|
244288 |
+ "579", /* 579 */
|
|
|
244288 |
+ "580", /* 580 */
|
|
|
244288 |
+ "581", /* 581 */
|
|
|
244288 |
+ "582", /* 582 */
|
|
|
244288 |
+ "583", /* 583 */
|
|
|
244288 |
+ "584", /* 584 */
|
|
|
244288 |
+ "585", /* 585 */
|
|
|
244288 |
+ "586", /* 586 */
|
|
|
244288 |
+ "587", /* 587 */
|
|
|
244288 |
+ "588", /* 588 */
|
|
|
244288 |
+ "589", /* 589 */
|
|
|
244288 |
+ "590", /* 590 */
|
|
|
244288 |
+ "591", /* 591 */
|
|
|
244288 |
+ "592", /* 592 */
|
|
|
244288 |
+ "593", /* 593 */
|
|
|
244288 |
+ "594", /* 594 */
|
|
|
244288 |
+ "595", /* 595 */
|
|
|
244288 |
+ "596", /* 596 */
|
|
|
244288 |
+ "597", /* 597 */
|
|
|
244288 |
+ "598", /* 598 */
|
|
|
244288 |
+ "599", /* 599 */
|
|
|
244288 |
+ "600", /* 600 */
|
|
|
244288 |
+ "601", /* 601 */
|
|
|
244288 |
+ "602", /* 602 */
|
|
|
244288 |
+ "603", /* 603 */
|
|
|
244288 |
+ "604", /* 604 */
|
|
|
244288 |
+ "605", /* 605 */
|
|
|
244288 |
+ "606", /* 606 */
|
|
|
244288 |
+ "607", /* 607 */
|
|
|
244288 |
+ "608", /* 608 */
|
|
|
244288 |
+ "609", /* 609 */
|
|
|
244288 |
+ "610", /* 610 */
|
|
|
244288 |
+ "611", /* 611 */
|
|
|
244288 |
+ "612", /* 612 */
|
|
|
244288 |
+ "613", /* 613 */
|
|
|
244288 |
+ "614", /* 614 */
|
|
|
244288 |
+ "615", /* 615 */
|
|
|
244288 |
+ "616", /* 616 */
|
|
|
244288 |
+ "617", /* 617 */
|
|
|
244288 |
+ "618", /* 618 */
|
|
|
244288 |
+ "619", /* 619 */
|
|
|
244288 |
+ "620", /* 620 */
|
|
|
244288 |
+ "621", /* 621 */
|
|
|
244288 |
+ "622", /* 622 */
|
|
|
244288 |
+ "623", /* 623 */
|
|
|
244288 |
+ "624", /* 624 */
|
|
|
244288 |
+ "625", /* 625 */
|
|
|
244288 |
+ "626", /* 626 */
|
|
|
244288 |
+ "627", /* 627 */
|
|
|
244288 |
+ "628", /* 628 */
|
|
|
244288 |
+ "629", /* 629 */
|
|
|
244288 |
+ "630", /* 630 */
|
|
|
244288 |
+ "631", /* 631 */
|
|
|
244288 |
+ "632", /* 632 */
|
|
|
244288 |
+ "633", /* 633 */
|
|
|
244288 |
+ "634", /* 634 */
|
|
|
244288 |
+ "635", /* 635 */
|
|
|
244288 |
+ "636", /* 636 */
|
|
|
244288 |
+ "637", /* 637 */
|
|
|
244288 |
+ "638", /* 638 */
|
|
|
244288 |
+ "639", /* 639 */
|
|
|
244288 |
+ "640", /* 640 */
|
|
|
244288 |
+ "641", /* 641 */
|
|
|
244288 |
+ "642", /* 642 */
|
|
|
244288 |
+ "643", /* 643 */
|
|
|
244288 |
+ "644", /* 644 */
|
|
|
244288 |
+ "645", /* 645 */
|
|
|
244288 |
+ "646", /* 646 */
|
|
|
244288 |
+ "647", /* 647 */
|
|
|
244288 |
+ "648", /* 648 */
|
|
|
244288 |
+ "649", /* 649 */
|
|
|
244288 |
+ "650", /* 650 */
|
|
|
244288 |
+ "651", /* 651 */
|
|
|
244288 |
+ "652", /* 652 */
|
|
|
244288 |
+ "653", /* 653 */
|
|
|
244288 |
+ "654", /* 654 */
|
|
|
244288 |
+ "655", /* 655 */
|
|
|
244288 |
+ "656", /* 656 */
|
|
|
244288 |
+ "657", /* 657 */
|
|
|
244288 |
+ "658", /* 658 */
|
|
|
244288 |
+ "659", /* 659 */
|
|
|
244288 |
+ "660", /* 660 */
|
|
|
244288 |
+ "661", /* 661 */
|
|
|
244288 |
+ "662", /* 662 */
|
|
|
244288 |
+ "663", /* 663 */
|
|
|
244288 |
+ "664", /* 664 */
|
|
|
244288 |
+ "665", /* 665 */
|
|
|
244288 |
+ "666", /* 666 */
|
|
|
244288 |
+ "667", /* 667 */
|
|
|
244288 |
+ "668", /* 668 */
|
|
|
244288 |
+ "669", /* 669 */
|
|
|
244288 |
+ "670", /* 670 */
|
|
|
244288 |
+ "671", /* 671 */
|
|
|
244288 |
+ "672", /* 672 */
|
|
|
244288 |
+ "673", /* 673 */
|
|
|
244288 |
+ "674", /* 674 */
|
|
|
244288 |
+ "675", /* 675 */
|
|
|
244288 |
+ "676", /* 676 */
|
|
|
244288 |
+ "677", /* 677 */
|
|
|
244288 |
+ "678", /* 678 */
|
|
|
244288 |
+ "679", /* 679 */
|
|
|
244288 |
+ "680", /* 680 */
|
|
|
244288 |
+ "681", /* 681 */
|
|
|
244288 |
+ "682", /* 682 */
|
|
|
244288 |
+ "683", /* 683 */
|
|
|
244288 |
+ "684", /* 684 */
|
|
|
244288 |
+ "685", /* 685 */
|
|
|
244288 |
+ "686", /* 686 */
|
|
|
244288 |
+ "687", /* 687 */
|
|
|
244288 |
+ "688", /* 688 */
|
|
|
244288 |
+ "689", /* 689 */
|
|
|
244288 |
+ "690", /* 690 */
|
|
|
244288 |
+ "691", /* 691 */
|
|
|
244288 |
+ "692", /* 692 */
|
|
|
244288 |
+ "693", /* 693 */
|
|
|
244288 |
+ "694", /* 694 */
|
|
|
244288 |
+ "695", /* 695 */
|
|
|
244288 |
+ "696", /* 696 */
|
|
|
244288 |
+ "697", /* 697 */
|
|
|
244288 |
+ "698", /* 698 */
|
|
|
244288 |
+ "699", /* 699 */
|
|
|
244288 |
+ "700", /* 700 */
|
|
|
244288 |
+ "701", /* 701 */
|
|
|
244288 |
+ "702", /* 702 */
|
|
|
244288 |
+ "703", /* 703 */
|
|
|
244288 |
+ "704", /* 704 */
|
|
|
244288 |
+ "705", /* 705 */
|
|
|
244288 |
+ "706", /* 706 */
|
|
|
244288 |
+ "707", /* 707 */
|
|
|
244288 |
+ "708", /* 708 */
|
|
|
244288 |
+ "709", /* 709 */
|
|
|
244288 |
+ "710", /* 710 */
|
|
|
244288 |
+ "711", /* 711 */
|
|
|
244288 |
+ "712", /* 712 */
|
|
|
244288 |
+ "713", /* 713 */
|
|
|
244288 |
+ "714", /* 714 */
|
|
|
244288 |
+ "715", /* 715 */
|
|
|
244288 |
+ "716", /* 716 */
|
|
|
244288 |
+ "717", /* 717 */
|
|
|
244288 |
+ "718", /* 718 */
|
|
|
244288 |
+ "719", /* 719 */
|
|
|
244288 |
+ "720", /* 720 */
|
|
|
244288 |
+ "721", /* 721 */
|
|
|
244288 |
+ "722", /* 722 */
|
|
|
244288 |
+ "723", /* 723 */
|
|
|
244288 |
+ "724", /* 724 */
|
|
|
244288 |
+ "725", /* 725 */
|
|
|
244288 |
+ "726", /* 726 */
|
|
|
244288 |
+ "727", /* 727 */
|
|
|
244288 |
+ "728", /* 728 */
|
|
|
244288 |
+ "729", /* 729 */
|
|
|
244288 |
+ "730", /* 730 */
|
|
|
244288 |
+ "731", /* 731 */
|
|
|
244288 |
+ "732", /* 732 */
|
|
|
244288 |
+ "733", /* 733 */
|
|
|
244288 |
+ "734", /* 734 */
|
|
|
244288 |
+ "735", /* 735 */
|
|
|
244288 |
+ "736", /* 736 */
|
|
|
244288 |
+ "737", /* 737 */
|
|
|
244288 |
+ "738", /* 738 */
|
|
|
244288 |
+ "739", /* 739 */
|
|
|
244288 |
+ "740", /* 740 */
|
|
|
244288 |
+ "741", /* 741 */
|
|
|
244288 |
+ "742", /* 742 */
|
|
|
244288 |
+ "743", /* 743 */
|
|
|
244288 |
+ "744", /* 744 */
|
|
|
244288 |
+ "745", /* 745 */
|
|
|
244288 |
+ "746", /* 746 */
|
|
|
244288 |
+ "747", /* 747 */
|
|
|
244288 |
+ "748", /* 748 */
|
|
|
244288 |
+ "749", /* 749 */
|
|
|
244288 |
+ "750", /* 750 */
|
|
|
244288 |
+ "751", /* 751 */
|
|
|
244288 |
+ "752", /* 752 */
|
|
|
244288 |
+ "753", /* 753 */
|
|
|
244288 |
+ "754", /* 754 */
|
|
|
244288 |
+ "755", /* 755 */
|
|
|
244288 |
+ "756", /* 756 */
|
|
|
244288 |
+ "757", /* 757 */
|
|
|
244288 |
+ "758", /* 758 */
|
|
|
244288 |
+ "759", /* 759 */
|
|
|
244288 |
+ "760", /* 760 */
|
|
|
244288 |
+ "761", /* 761 */
|
|
|
244288 |
+ "762", /* 762 */
|
|
|
244288 |
+ "763", /* 763 */
|
|
|
244288 |
+ "764", /* 764 */
|
|
|
244288 |
+ "765", /* 765 */
|
|
|
244288 |
+ "766", /* 766 */
|
|
|
244288 |
+ "767", /* 767 */
|
|
|
244288 |
+ "768", /* 768 */
|
|
|
244288 |
+ "769", /* 769 */
|
|
|
244288 |
+ "770", /* 770 */
|
|
|
244288 |
+ "771", /* 771 */
|
|
|
244288 |
+ "772", /* 772 */
|
|
|
244288 |
+ "773", /* 773 */
|
|
|
244288 |
+ "774", /* 774 */
|
|
|
244288 |
+ "775", /* 775 */
|
|
|
244288 |
+ "776", /* 776 */
|
|
|
244288 |
+ "777", /* 777 */
|
|
|
244288 |
+ "778", /* 778 */
|
|
|
244288 |
+ "779", /* 779 */
|
|
|
244288 |
+ "780", /* 780 */
|
|
|
244288 |
+ "781", /* 781 */
|
|
|
244288 |
+ "782", /* 782 */
|
|
|
244288 |
+ "783", /* 783 */
|
|
|
244288 |
+ "784", /* 784 */
|
|
|
244288 |
+ "785", /* 785 */
|
|
|
244288 |
+ "786", /* 786 */
|
|
|
244288 |
+ "787", /* 787 */
|
|
|
244288 |
+ "788", /* 788 */
|
|
|
244288 |
+ "789", /* 789 */
|
|
|
244288 |
+ "790", /* 790 */
|
|
|
244288 |
+ "791", /* 791 */
|
|
|
244288 |
+ "792", /* 792 */
|
|
|
244288 |
+ "793", /* 793 */
|
|
|
244288 |
+ "794", /* 794 */
|
|
|
244288 |
+ "795", /* 795 */
|
|
|
244288 |
+ "796", /* 796 */
|
|
|
244288 |
+ "797", /* 797 */
|
|
|
244288 |
+ "798", /* 798 */
|
|
|
244288 |
+ "799", /* 799 */
|
|
|
244288 |
+ "800", /* 800 */
|
|
|
244288 |
+ "801", /* 801 */
|
|
|
244288 |
+ "802", /* 802 */
|
|
|
244288 |
+ "803", /* 803 */
|
|
|
244288 |
+ "804", /* 804 */
|
|
|
244288 |
+ "805", /* 805 */
|
|
|
244288 |
+ "806", /* 806 */
|
|
|
244288 |
+ "807", /* 807 */
|
|
|
244288 |
+ "808", /* 808 */
|
|
|
244288 |
+ "809", /* 809 */
|
|
|
244288 |
+ "810", /* 810 */
|
|
|
244288 |
+ "811", /* 811 */
|
|
|
244288 |
+ "812", /* 812 */
|
|
|
244288 |
+ "813", /* 813 */
|
|
|
244288 |
+ "814", /* 814 */
|
|
|
244288 |
+ "815", /* 815 */
|
|
|
244288 |
+ "816", /* 816 */
|
|
|
244288 |
+ "817", /* 817 */
|
|
|
244288 |
+ "818", /* 818 */
|
|
|
244288 |
+ "819", /* 819 */
|
|
|
244288 |
+ "820", /* 820 */
|
|
|
244288 |
+ "821", /* 821 */
|
|
|
244288 |
+ "822", /* 822 */
|
|
|
244288 |
+ "823", /* 823 */
|
|
|
244288 |
+ "824", /* 824 */
|
|
|
244288 |
+ "825", /* 825 */
|
|
|
244288 |
+ "826", /* 826 */
|
|
|
244288 |
+ "827", /* 827 */
|
|
|
244288 |
+ "828", /* 828 */
|
|
|
244288 |
+ "829", /* 829 */
|
|
|
244288 |
+ "830", /* 830 */
|
|
|
244288 |
+ "831", /* 831 */
|
|
|
244288 |
+ "832", /* 832 */
|
|
|
244288 |
+ "833", /* 833 */
|
|
|
244288 |
+ "834", /* 834 */
|
|
|
244288 |
+ "835", /* 835 */
|
|
|
244288 |
+ "836", /* 836 */
|
|
|
244288 |
+ "837", /* 837 */
|
|
|
244288 |
+ "838", /* 838 */
|
|
|
244288 |
+ "839", /* 839 */
|
|
|
244288 |
+ "840", /* 840 */
|
|
|
244288 |
+ "841", /* 841 */
|
|
|
244288 |
+ "842", /* 842 */
|
|
|
244288 |
+ "843", /* 843 */
|
|
|
244288 |
+ "844", /* 844 */
|
|
|
244288 |
+ "845", /* 845 */
|
|
|
244288 |
+ "846", /* 846 */
|
|
|
244288 |
+ "847", /* 847 */
|
|
|
244288 |
+ "848", /* 848 */
|
|
|
244288 |
+ "849", /* 849 */
|
|
|
244288 |
+ "850", /* 850 */
|
|
|
244288 |
+ "851", /* 851 */
|
|
|
244288 |
+ "852", /* 852 */
|
|
|
244288 |
+ "853", /* 853 */
|
|
|
244288 |
+ "854", /* 854 */
|
|
|
244288 |
+ "855", /* 855 */
|
|
|
244288 |
+ "856", /* 856 */
|
|
|
244288 |
+ "857", /* 857 */
|
|
|
244288 |
+ "858", /* 858 */
|
|
|
244288 |
+ "859", /* 859 */
|
|
|
244288 |
+ "860", /* 860 */
|
|
|
244288 |
+ "861", /* 861 */
|
|
|
244288 |
+ "862", /* 862 */
|
|
|
244288 |
+ "863", /* 863 */
|
|
|
244288 |
+ "864", /* 864 */
|
|
|
244288 |
+ "865", /* 865 */
|
|
|
244288 |
+ "866", /* 866 */
|
|
|
244288 |
+ "867", /* 867 */
|
|
|
244288 |
+ "868", /* 868 */
|
|
|
244288 |
+ "869", /* 869 */
|
|
|
244288 |
+ "870", /* 870 */
|
|
|
244288 |
+ "871", /* 871 */
|
|
|
244288 |
+ "872", /* 872 */
|
|
|
244288 |
+ "873", /* 873 */
|
|
|
244288 |
+ "874", /* 874 */
|
|
|
244288 |
+ "875", /* 875 */
|
|
|
244288 |
+ "876", /* 876 */
|
|
|
244288 |
+ "877", /* 877 */
|
|
|
244288 |
+ "878", /* 878 */
|
|
|
244288 |
+ "879", /* 879 */
|
|
|
244288 |
+ "880", /* 880 */
|
|
|
244288 |
+ "881", /* 881 */
|
|
|
244288 |
+ "882", /* 882 */
|
|
|
244288 |
+ "883", /* 883 */
|
|
|
244288 |
+ "884", /* 884 */
|
|
|
244288 |
+ "885", /* 885 */
|
|
|
244288 |
+ "886", /* 886 */
|
|
|
244288 |
+ "887", /* 887 */
|
|
|
244288 |
+ "888", /* 888 */
|
|
|
244288 |
+ "889", /* 889 */
|
|
|
244288 |
+ "890", /* 890 */
|
|
|
244288 |
+ "891", /* 891 */
|
|
|
244288 |
+ "892", /* 892 */
|
|
|
244288 |
+ "893", /* 893 */
|
|
|
244288 |
+ "894", /* 894 */
|
|
|
244288 |
+ "895", /* 895 */
|
|
|
244288 |
+ "896", /* 896 */
|
|
|
244288 |
+ "897", /* 897 */
|
|
|
244288 |
+ "898", /* 898 */
|
|
|
244288 |
+ "899", /* 899 */
|
|
|
244288 |
+ "900", /* 900 */
|
|
|
244288 |
+ "901", /* 901 */
|
|
|
244288 |
+ "902", /* 902 */
|
|
|
244288 |
+ "903", /* 903 */
|
|
|
244288 |
+ "904", /* 904 */
|
|
|
244288 |
+ "905", /* 905 */
|
|
|
244288 |
+ "906", /* 906 */
|
|
|
244288 |
+ "907", /* 907 */
|
|
|
244288 |
+ "908", /* 908 */
|
|
|
244288 |
+ "909", /* 909 */
|
|
|
244288 |
+ "910", /* 910 */
|
|
|
244288 |
+ "911", /* 911 */
|
|
|
244288 |
+ "912", /* 912 */
|
|
|
244288 |
+ "913", /* 913 */
|
|
|
244288 |
+ "914", /* 914 */
|
|
|
244288 |
+ "915", /* 915 */
|
|
|
244288 |
+ "916", /* 916 */
|
|
|
244288 |
+ "917", /* 917 */
|
|
|
244288 |
+ "918", /* 918 */
|
|
|
244288 |
+ "919", /* 919 */
|
|
|
244288 |
+ "920", /* 920 */
|
|
|
244288 |
+ "921", /* 921 */
|
|
|
244288 |
+ "922", /* 922 */
|
|
|
244288 |
+ "923", /* 923 */
|
|
|
244288 |
+ "924", /* 924 */
|
|
|
244288 |
+ "925", /* 925 */
|
|
|
244288 |
+ "926", /* 926 */
|
|
|
244288 |
+ "927", /* 927 */
|
|
|
244288 |
+ "928", /* 928 */
|
|
|
244288 |
+ "929", /* 929 */
|
|
|
244288 |
+ "930", /* 930 */
|
|
|
244288 |
+ "931", /* 931 */
|
|
|
244288 |
+ "932", /* 932 */
|
|
|
244288 |
+ "933", /* 933 */
|
|
|
244288 |
+ "934", /* 934 */
|
|
|
244288 |
+ "935", /* 935 */
|
|
|
244288 |
+ "936", /* 936 */
|
|
|
244288 |
+ "937", /* 937 */
|
|
|
244288 |
+ "938", /* 938 */
|
|
|
244288 |
+ "939", /* 939 */
|
|
|
244288 |
+ "940", /* 940 */
|
|
|
244288 |
+ "941", /* 941 */
|
|
|
244288 |
+ "942", /* 942 */
|
|
|
244288 |
+ "943", /* 943 */
|
|
|
244288 |
+ "944", /* 944 */
|
|
|
244288 |
+ "945", /* 945 */
|
|
|
244288 |
+ "946", /* 946 */
|
|
|
244288 |
+ "947", /* 947 */
|
|
|
244288 |
+ "948", /* 948 */
|
|
|
244288 |
+ "949", /* 949 */
|
|
|
244288 |
+ "950", /* 950 */
|
|
|
244288 |
+ "951", /* 951 */
|
|
|
244288 |
+ "952", /* 952 */
|
|
|
244288 |
+ "953", /* 953 */
|
|
|
244288 |
+ "954", /* 954 */
|
|
|
244288 |
+ "955", /* 955 */
|
|
|
244288 |
+ "956", /* 956 */
|
|
|
244288 |
+ "957", /* 957 */
|
|
|
244288 |
+ "958", /* 958 */
|
|
|
244288 |
+ "959", /* 959 */
|
|
|
244288 |
+ "960", /* 960 */
|
|
|
244288 |
+ "961", /* 961 */
|
|
|
244288 |
+ "962", /* 962 */
|
|
|
244288 |
+ "963", /* 963 */
|
|
|
244288 |
+ "964", /* 964 */
|
|
|
244288 |
+ "965", /* 965 */
|
|
|
244288 |
+ "966", /* 966 */
|
|
|
244288 |
+ "967", /* 967 */
|
|
|
244288 |
+ "968", /* 968 */
|
|
|
244288 |
+ "969", /* 969 */
|
|
|
244288 |
+ "970", /* 970 */
|
|
|
244288 |
+ "971", /* 971 */
|
|
|
244288 |
+ "972", /* 972 */
|
|
|
244288 |
+ "973", /* 973 */
|
|
|
244288 |
+ "974", /* 974 */
|
|
|
244288 |
+ "975", /* 975 */
|
|
|
244288 |
+ "976", /* 976 */
|
|
|
244288 |
+ "977", /* 977 */
|
|
|
244288 |
+ "978", /* 978 */
|
|
|
244288 |
+ "979", /* 979 */
|
|
|
244288 |
+ "980", /* 980 */
|
|
|
244288 |
+ "981", /* 981 */
|
|
|
244288 |
+ "982", /* 982 */
|
|
|
244288 |
+ "983", /* 983 */
|
|
|
244288 |
+ "984", /* 984 */
|
|
|
244288 |
+ "985", /* 985 */
|
|
|
244288 |
+ "986", /* 986 */
|
|
|
244288 |
+ "987", /* 987 */
|
|
|
244288 |
+ "988", /* 988 */
|
|
|
244288 |
+ "989", /* 989 */
|
|
|
244288 |
+ "990", /* 990 */
|
|
|
244288 |
+ "991", /* 991 */
|
|
|
244288 |
+ "992", /* 992 */
|
|
|
244288 |
+ "993", /* 993 */
|
|
|
244288 |
+ "994", /* 994 */
|
|
|
244288 |
+ "995", /* 995 */
|
|
|
244288 |
+ "996", /* 996 */
|
|
|
244288 |
+ "997", /* 997 */
|
|
|
244288 |
+ "998", /* 998 */
|
|
|
244288 |
+ "999", /* 999 */
|
|
|
244288 |
+ "1000", /* 1000 */
|
|
|
244288 |
+ "1001", /* 1001 */
|
|
|
244288 |
+ "1002", /* 1002 */
|
|
|
244288 |
+ "1003", /* 1003 */
|
|
|
244288 |
+ "1004", /* 1004 */
|
|
|
244288 |
+ "1005", /* 1005 */
|
|
|
244288 |
+ "1006", /* 1006 */
|
|
|
244288 |
+ "1007", /* 1007 */
|
|
|
244288 |
+ "1008", /* 1008 */
|
|
|
244288 |
+ "1009", /* 1009 */
|
|
|
244288 |
+ "1010", /* 1010 */
|
|
|
244288 |
+ "1011", /* 1011 */
|
|
|
244288 |
+ "1012", /* 1012 */
|
|
|
244288 |
+ "1013", /* 1013 */
|
|
|
244288 |
+ "1014", /* 1014 */
|
|
|
244288 |
+ "1015", /* 1015 */
|
|
|
244288 |
+ "1016", /* 1016 */
|
|
|
244288 |
+ "1017", /* 1017 */
|
|
|
244288 |
+ "1018", /* 1018 */
|
|
|
244288 |
+ "1019", /* 1019 */
|
|
|
244288 |
+ "1020", /* 1020 */
|
|
|
244288 |
+ "1021", /* 1021 */
|
|
|
244288 |
+ "1022", /* 1022 */
|
|
|
244288 |
+ "1023", /* 1023 */
|
|
|
244288 |
+ "open", /* 1024 */
|
|
|
244288 |
+ "link", /* 1025 */
|
|
|
244288 |
+ "unlink", /* 1026 */
|
|
|
244288 |
+ "mknod", /* 1027 */
|
|
|
244288 |
+ "chmod", /* 1028 */
|
|
|
244288 |
+ "chown", /* 1029 */
|
|
|
244288 |
+ "mkdir", /* 1030 */
|
|
|
244288 |
+ "rmdir", /* 1031 */
|
|
|
244288 |
+ "lchown", /* 1032 */
|
|
|
244288 |
+ "access", /* 1033 */
|
|
|
244288 |
+ "rename", /* 1034 */
|
|
|
244288 |
+ "readlink", /* 1035 */
|
|
|
244288 |
+ "symlink", /* 1036 */
|
|
|
244288 |
+ "utimes", /* 1037 */
|
|
|
244288 |
+ "stat", /* 1038 */
|
|
|
244288 |
+ "lstat", /* 1039 */
|
|
|
244288 |
+ "pipe", /* 1040 */
|
|
|
244288 |
+ "dup2", /* 1041 */
|
|
|
244288 |
+ "epoll_create", /* 1042 */
|
|
|
244288 |
+ "inotify_init", /* 1043 */
|
|
|
244288 |
+ "eventfd", /* 1044 */
|
|
|
244288 |
+ "signalfd", /* 1045 */
|
|
|
244288 |
+ "sendfile", /* 1046 */
|
|
|
244288 |
+ "ftruncate", /* 1047 */
|
|
|
244288 |
+ "truncate", /* 1048 */
|
|
|
244288 |
+ "stat", /* 1049 */
|
|
|
244288 |
+ "lstat", /* 1050 */
|
|
|
244288 |
+ "fstat", /* 1051 */
|
|
|
244288 |
+ "fcntl", /* 1052 */
|
|
|
244288 |
+ "fadvise64", /* 1053 */
|
|
|
244288 |
+ "newfstatat", /* 1054 */
|
|
|
244288 |
+ "fstatfs", /* 1055 */
|
|
|
244288 |
+ "statfs", /* 1056 */
|
|
|
244288 |
+ "lseek", /* 1057 */
|
|
|
244288 |
+ "mmap", /* 1058 */
|
|
|
244288 |
+ "alarm", /* 1059 */
|
|
|
244288 |
+ "getpgrp", /* 1060 */
|
|
|
244288 |
+ "pause", /* 1061 */
|
|
|
244288 |
+ "time", /* 1062 */
|
|
|
244288 |
+ "utime", /* 1063 */
|
|
|
244288 |
+ "creat", /* 1064 */
|
|
|
244288 |
+ "getdents", /* 1065 */
|
|
|
244288 |
+ "futimesat", /* 1066 */
|
|
|
244288 |
+ "select", /* 1067 */
|
|
|
244288 |
+ "poll", /* 1068 */
|
|
|
244288 |
+ "epoll_wait", /* 1069 */
|
|
|
244288 |
+ "ustat", /* 1070 */
|
|
|
244288 |
+ "vfork", /* 1071 */
|
|
|
244288 |
+ "oldwait4", /* 1072 */
|
|
|
244288 |
+ "recv", /* 1073 */
|
|
|
244288 |
+ "send", /* 1074 */
|
|
|
244288 |
+ "bdflush", /* 1075 */
|
|
|
244288 |
+ "umount", /* 1076 */
|
|
|
244288 |
+ "uselib", /* 1077 */
|
|
|
244288 |
+ "_sysctl", /* 1078 */
|
|
|
244288 |
+ "fork", /* 1079 */
|
|
|
244288 |
diff --git a/sysdeps/linux-gnu/aarch64/trace.c b/sysdeps/linux-gnu/aarch64/trace.c
|
|
|
244288 |
new file mode 100644
|
|
|
244288 |
index 0000000..5544b51
|
|
|
244288 |
--- /dev/null
|
|
|
244288 |
+++ b/sysdeps/linux-gnu/aarch64/trace.c
|
|
|
244288 |
@@ -0,0 +1,83 @@
|
|
|
244288 |
+/*
|
|
|
244288 |
+ * This file is part of ltrace.
|
|
|
244288 |
+ * Copyright (C) 2014 Petr Machata, Red Hat, Inc.
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * This program is free software; you can redistribute it and/or
|
|
|
244288 |
+ * modify it under the terms of the GNU General Public License as
|
|
|
244288 |
+ * published by the Free Software Foundation; either version 2 of the
|
|
|
244288 |
+ * License, or (at your option) any later version.
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * This program is distributed in the hope that it will be useful, but
|
|
|
244288 |
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
244288 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
244288 |
+ * General Public License for more details.
|
|
|
244288 |
+ *
|
|
|
244288 |
+ * You should have received a copy of the GNU General Public License
|
|
|
244288 |
+ * along with this program; if not, write to the Free Software
|
|
|
244288 |
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
|
244288 |
+ * 02110-1301 USA
|
|
|
244288 |
+ */
|
|
|
244288 |
+
|
|
|
244288 |
+#include <sys/ptrace.h>
|
|
|
244288 |
+#include <sys/types.h>
|
|
|
244288 |
+#include <sys/wait.h>
|
|
|
244288 |
+#include <asm/ptrace.h>
|
|
|
244288 |
+#include <string.h>
|
|
|
244288 |
+#include <errno.h>
|
|
|
244288 |
+
|
|
|
244288 |
+#include "backend.h"
|
|
|
244288 |
+#include "proc.h"
|
|
|
244288 |
+
|
|
|
244288 |
+void
|
|
|
244288 |
+get_arch_dep(struct process *proc)
|
|
|
244288 |
+{
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+int aarch64_read_gregs(struct process *proc, struct user_pt_regs *regs);
|
|
|
244288 |
+
|
|
|
244288 |
+/* The syscall instruction is:
|
|
|
244288 |
+ * | 31 21 | 20 5 | 4 0 |
|
|
|
244288 |
+ * | 1 1 0 1 0 1 0 0 | 0 0 0 | imm16 | 0 0 0 0 1 | */
|
|
|
244288 |
+#define SVC_MASK 0xffe0001f
|
|
|
244288 |
+#define SVC_VALUE 0xd4000001
|
|
|
244288 |
+
|
|
|
244288 |
+int
|
|
|
244288 |
+syscall_p(struct process *proc, int status, int *sysnum)
|
|
|
244288 |
+{
|
|
|
244288 |
+ if (WIFSTOPPED(status)
|
|
|
244288 |
+ && WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) {
|
|
|
244288 |
+
|
|
|
244288 |
+ struct user_pt_regs regs;
|
|
|
244288 |
+ if (aarch64_read_gregs(proc, ®s) < 0) {
|
|
|
244288 |
+ fprintf(stderr, "syscall_p: "
|
|
|
244288 |
+ "Couldn't read registers of %d.\n", proc->pid);
|
|
|
244288 |
+ return -1;
|
|
|
244288 |
+ }
|
|
|
244288 |
+
|
|
|
244288 |
+ errno = 0;
|
|
|
244288 |
+ unsigned long insn = (unsigned long) ptrace(PTRACE_PEEKTEXT,
|
|
|
244288 |
+ proc->pid,
|
|
|
244288 |
+ regs.pc - 4, 0);
|
|
|
244288 |
+ if (insn == -1UL && errno != 0) {
|
|
|
244288 |
+ fprintf(stderr, "syscall_p: "
|
|
|
244288 |
+ "Couldn't peek into %d: %s\n", proc->pid,
|
|
|
244288 |
+ strerror(errno));
|
|
|
244288 |
+ return -1;
|
|
|
244288 |
+ }
|
|
|
244288 |
+
|
|
|
244288 |
+ insn &= 0xffffffffUL;
|
|
|
244288 |
+ if ((insn & SVC_MASK) == SVC_VALUE) {
|
|
|
244288 |
+ *sysnum = regs.regs[8];
|
|
|
244288 |
+
|
|
|
244288 |
+ size_t d1 = proc->callstack_depth - 1;
|
|
|
244288 |
+ if (proc->callstack_depth > 0
|
|
|
244288 |
+ && proc->callstack[d1].is_syscall
|
|
|
244288 |
+ && proc->callstack[d1].c_un.syscall == *sysnum)
|
|
|
244288 |
+ return 2;
|
|
|
244288 |
+
|
|
|
244288 |
+ return 1;
|
|
|
244288 |
+ }
|
|
|
244288 |
+ }
|
|
|
244288 |
+
|
|
|
244288 |
+ return 0;
|
|
|
244288 |
+}
|
|
|
244288 |
diff --git a/testsuite/ltrace.main/system_call_params.exp b/testsuite/ltrace.main/system_call_params.exp
|
|
|
244288 |
index 787e342..2ccf840 100644
|
|
|
244288 |
--- a/testsuite/ltrace.main/system_call_params.exp
|
|
|
244288 |
+++ b/testsuite/ltrace.main/system_call_params.exp
|
|
|
244288 |
@@ -1,5 +1,5 @@
|
|
|
244288 |
# This file is part of ltrace.
|
|
|
244288 |
-# Copyright (C) 2013 Petr Machata, Red Hat Inc.
|
|
|
244288 |
+# Copyright (C) 2013, 2014 Petr Machata, Red Hat Inc.
|
|
|
244288 |
#
|
|
|
244288 |
# This program is free software; you can redistribute it and/or
|
|
|
244288 |
# modify it under the terms of the GNU General Public License as
|
|
|
244288 |
@@ -17,11 +17,25 @@
|
|
|
244288 |
# 02110-1301 USA
|
|
|
244288 |
|
|
|
244288 |
set bin [ltraceCompile {} [ltraceSource c {
|
|
|
244288 |
+ #define _GNU_SOURCE
|
|
|
244288 |
#include <sys/types.h>
|
|
|
244288 |
#include <sys/stat.h>
|
|
|
244288 |
#include <fcntl.h>
|
|
|
244288 |
+ #include <unistd.h>
|
|
|
244288 |
+ #include <sys/syscall.h> /* For SYS_xxx definitions */
|
|
|
244288 |
+
|
|
|
244288 |
+ #ifndef SYS_open
|
|
|
244288 |
+ # if defined(__aarch64__)
|
|
|
244288 |
+ # /* Linux doesn't actually implement SYS_open on AArch64, but for merely
|
|
|
244288 |
+ # * recording the syscall, it's fine. */
|
|
|
244288 |
+ # define SYS_open 1024
|
|
|
244288 |
+ # else
|
|
|
244288 |
+ # error SYS_open not available.
|
|
|
244288 |
+ # endif
|
|
|
244288 |
+ #endif
|
|
|
244288 |
+
|
|
|
244288 |
int main(void) {
|
|
|
244288 |
- open("/some/path", O_RDONLY);
|
|
|
244288 |
+ syscall(SYS_open, "/some/path", O_RDONLY);
|
|
|
244288 |
write(1, "something", 10);
|
|
|
244288 |
mount("source", "target", "filesystemtype", 0, 0);
|
|
|
244288 |
}
|
|
|
244288 |
diff --git a/testsuite/ltrace.main/system_calls.c b/testsuite/ltrace.main/system_calls.c
|
|
|
244288 |
deleted file mode 100644
|
|
|
244288 |
index 7be3d04..0000000
|
|
|
244288 |
--- a/testsuite/ltrace.main/system_calls.c
|
|
|
244288 |
+++ /dev/null
|
|
|
244288 |
@@ -1,68 +0,0 @@
|
|
|
244288 |
-/* Ltrace Test : system_calls.c.
|
|
|
244288 |
- Objectives : Verify that Ltrace can trace all the system calls in
|
|
|
244288 |
- execution.
|
|
|
244288 |
-
|
|
|
244288 |
- You can add new system calls in it and add its verification in
|
|
|
244288 |
- system_calls correspondingly.
|
|
|
244288 |
-
|
|
|
244288 |
- This file was written by Yao Qi <qiyao@cn.ibm.com>. */
|
|
|
244288 |
-
|
|
|
244288 |
-#include <stdio.h>
|
|
|
244288 |
-#include <unistd.h>
|
|
|
244288 |
-#include <sys/syscall.h>
|
|
|
244288 |
-#include <sys/stat.h>
|
|
|
244288 |
-#include <errno.h>
|
|
|
244288 |
-
|
|
|
244288 |
-void exit (int);
|
|
|
244288 |
-
|
|
|
244288 |
-#define BUF_SIZE 100
|
|
|
244288 |
-
|
|
|
244288 |
-int
|
|
|
244288 |
-main ()
|
|
|
244288 |
-{
|
|
|
244288 |
- FILE* fp;
|
|
|
244288 |
- char s[]="system_calls";
|
|
|
244288 |
- char buffer[BUF_SIZE];
|
|
|
244288 |
- struct stat state;
|
|
|
244288 |
-
|
|
|
244288 |
- /* SYS_open. */
|
|
|
244288 |
- fp = fopen ("system_calls.tmp", "w");
|
|
|
244288 |
- if (fp == NULL)
|
|
|
244288 |
- {
|
|
|
244288 |
- printf("Can not create system_calls.tmp\n");
|
|
|
244288 |
- exit (0);
|
|
|
244288 |
- }
|
|
|
244288 |
- /* SYS_write. */
|
|
|
244288 |
- fwrite(s, sizeof(s), 1, fp);
|
|
|
244288 |
- /* SYS_lseek. */
|
|
|
244288 |
- fseek (fp, 0, SEEK_CUR);
|
|
|
244288 |
- /* SYS_read. */
|
|
|
244288 |
- fread(buffer, sizeof(s), 1, fp);
|
|
|
244288 |
- /* SYS_close. */
|
|
|
244288 |
- fclose(fp);
|
|
|
244288 |
-
|
|
|
244288 |
- /* SYS_getcwd. */
|
|
|
244288 |
- getcwd (buffer, BUF_SIZE);
|
|
|
244288 |
- /* SYS_chdir. */
|
|
|
244288 |
- chdir (".");
|
|
|
244288 |
- /* SYS_symlink. */
|
|
|
244288 |
- symlink ("system_calls.tmp", "system_calls.link");
|
|
|
244288 |
- /* SYS_unlink. */
|
|
|
244288 |
- remove("system_calls.link");
|
|
|
244288 |
- /* SYS_rename. */
|
|
|
244288 |
- rename ("system_calls.tmp", "system_calls.tmp1");
|
|
|
244288 |
- /* SYS_stat. */
|
|
|
244288 |
- stat ("system_calls.tmp", &state);
|
|
|
244288 |
- /* SYS_access. */
|
|
|
244288 |
- access ("system_calls.tmp", R_OK);
|
|
|
244288 |
- remove("system_calls.tmp1");
|
|
|
244288 |
-
|
|
|
244288 |
- /* SYS_mkdir. */
|
|
|
244288 |
- mkdir ("system_call_mkdir", 0777);
|
|
|
244288 |
- /* SYS_rmdir. */
|
|
|
244288 |
- rmdir ("system_call_mkdir");
|
|
|
244288 |
-
|
|
|
244288 |
- return 0;
|
|
|
244288 |
-}
|
|
|
244288 |
-
|
|
|
244288 |
-
|
|
|
244288 |
diff --git a/testsuite/ltrace.main/system_calls.exp b/testsuite/ltrace.main/system_calls.exp
|
|
|
244288 |
index a74fa04..f60e319 100644
|
|
|
244288 |
--- a/testsuite/ltrace.main/system_calls.exp
|
|
|
244288 |
+++ b/testsuite/ltrace.main/system_calls.exp
|
|
|
244288 |
@@ -1,67 +1,146 @@
|
|
|
244288 |
-# This file was written by Yao Qi <qiyao@cn.ibm.com>.
|
|
|
244288 |
+# This file is part of ltrace.
|
|
|
244288 |
+# Copyright (C) 2014 Petr Machata, Red Hat Inc.
|
|
|
244288 |
+# Copyright (C) 2006 Yao Qi <qiyao@cn.ibm.com>, IBM Corporation
|
|
|
244288 |
+#
|
|
|
244288 |
+# This program is free software; you can redistribute it and/or
|
|
|
244288 |
+# modify it under the terms of the GNU General Public License as
|
|
|
244288 |
+# published by the Free Software Foundation; either version 2 of the
|
|
|
244288 |
+# License, or (at your option) any later version.
|
|
|
244288 |
+#
|
|
|
244288 |
+# This program is distributed in the hope that it will be useful, but
|
|
|
244288 |
+# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
244288 |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
244288 |
+# General Public License for more details.
|
|
|
244288 |
+#
|
|
|
244288 |
+# You should have received a copy of the GNU General Public License
|
|
|
244288 |
+# along with this program; if not, write to the Free Software
|
|
|
244288 |
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
|
244288 |
+# 02110-1301 USA
|
|
|
244288 |
|
|
|
244288 |
-set testfile "system_calls"
|
|
|
244288 |
-set srcfile ${testfile}.c
|
|
|
244288 |
-set binfile ${testfile}
|
|
|
244288 |
+# Objectives: Verify that Ltrace can trace all the system calls in
|
|
|
244288 |
+# execution. Note that this test is necessarily noisy. Dynamic
|
|
|
244288 |
+# linker adds a bunch of system calls of its own.
|
|
|
244288 |
|
|
|
244288 |
+set empty [ltraceCompile {} [ltraceSource c {
|
|
|
244288 |
+ int main (void) { return 0; }
|
|
|
244288 |
+}]]
|
|
|
244288 |
|
|
|
244288 |
-verbose "compiling source file now....."
|
|
|
244288 |
-# Build the shared libraries this test case needs.
|
|
|
244288 |
-if { [ ltrace_compile "${srcdir}/${subdir}/${testfile}.c" "${objdir}/${subdir}/${binfile}" executable {debug} ] != "" } {
|
|
|
244288 |
- send_user "Testcase compile failed, so all tests in this file will automatically fail.\n"
|
|
|
244288 |
+set bin [ltraceCompile {} [ltraceSource c {
|
|
|
244288 |
+ #include <stdio.h>
|
|
|
244288 |
+ #include <unistd.h>
|
|
|
244288 |
+ #include <sys/syscall.h>
|
|
|
244288 |
+ #include <sys/stat.h>
|
|
|
244288 |
+ #include <errno.h>
|
|
|
244288 |
+ #include <stdlib.h>
|
|
|
244288 |
+
|
|
|
244288 |
+ int
|
|
|
244288 |
+ main ()
|
|
|
244288 |
+ {
|
|
|
244288 |
+ FILE* fp;
|
|
|
244288 |
+ char s[]="system_calls";
|
|
|
244288 |
+ char buffer[1024];
|
|
|
244288 |
+ struct stat state;
|
|
|
244288 |
+
|
|
|
244288 |
+ fp = fopen ("system_calls.tmp", "w");
|
|
|
244288 |
+ if (fp == NULL)
|
|
|
244288 |
+ {
|
|
|
244288 |
+ printf("Can not create system_calls.tmp\n");
|
|
|
244288 |
+ exit (0);
|
|
|
244288 |
+ }
|
|
|
244288 |
+ fwrite(s, sizeof(s), 1, fp);
|
|
|
244288 |
+ fseek (fp, 0, SEEK_CUR);
|
|
|
244288 |
+ fread(buffer, sizeof(s), 1, fp);
|
|
|
244288 |
+ fclose(fp);
|
|
|
244288 |
+
|
|
|
244288 |
+ getcwd (buffer, sizeof buffer);
|
|
|
244288 |
+ chdir (".");
|
|
|
244288 |
+ symlink ("system_calls.tmp", "system_calls.link");
|
|
|
244288 |
+ remove("system_calls.link");
|
|
|
244288 |
+ rename ("system_calls.tmp", "system_calls.tmp1");
|
|
|
244288 |
+ stat ("system_calls.tmp", &state);
|
|
|
244288 |
+ access ("system_calls.tmp", R_OK);
|
|
|
244288 |
+ remove("system_calls.tmp1");
|
|
|
244288 |
+
|
|
|
244288 |
+ mkdir ("system_call_mkdir", 0777);
|
|
|
244288 |
+ rmdir ("system_call_mkdir");
|
|
|
244288 |
+
|
|
|
244288 |
+ return 0;
|
|
|
244288 |
+ }
|
|
|
244288 |
+}]]
|
|
|
244288 |
+
|
|
|
244288 |
+proc Calls {logfile} {
|
|
|
244288 |
+ set fp [open $logfile]
|
|
|
244288 |
+ set ret {}
|
|
|
244288 |
+
|
|
|
244288 |
+ while {[gets $fp line] >= 0} {
|
|
|
244288 |
+ if [regexp -- {^[a-zA-Z0-9]*@SYS} $line] {
|
|
|
244288 |
+ set call [lindex [split $line @] 0]
|
|
|
244288 |
+ dict incr ret $call
|
|
|
244288 |
+ }
|
|
|
244288 |
+ }
|
|
|
244288 |
+
|
|
|
244288 |
+ close $fp
|
|
|
244288 |
+ return $ret
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+proc GetDefault {d key def} {
|
|
|
244288 |
+ if {[dict exists $d $key]} {
|
|
|
244288 |
+ return [dict get $d $key]
|
|
|
244288 |
+ } else {
|
|
|
244288 |
+ return $def
|
|
|
244288 |
+ }
|
|
|
244288 |
}
|
|
|
244288 |
|
|
|
244288 |
-# set options for ltrace.
|
|
|
244288 |
-ltrace_options "-S"
|
|
|
244288 |
+proc Diff {d1 d2} {
|
|
|
244288 |
+ set keys [lsort -unique [concat [dict keys $d1] [dict keys $d2]]]
|
|
|
244288 |
+ set ret {}
|
|
|
244288 |
+ foreach key $keys {
|
|
|
244288 |
+ set n1 [GetDefault $d1 $key 0]
|
|
|
244288 |
+ set n2 [GetDefault $d2 $key 0]
|
|
|
244288 |
+ set sum [expr $n1 - $n2]
|
|
|
244288 |
+ if {[expr $sum != 0]} {
|
|
|
244288 |
+ dict set ret $key $sum
|
|
|
244288 |
+ }
|
|
|
244288 |
+ }
|
|
|
244288 |
+ return $ret
|
|
|
244288 |
+}
|
|
|
244288 |
+
|
|
|
244288 |
+proc Match {d patterns} {
|
|
|
244288 |
+ foreach line $patterns {
|
|
|
244288 |
+ set pattern [lindex $line 0]
|
|
|
244288 |
+ set op [lindex $line 1]
|
|
|
244288 |
+ set expect [lindex $line 2]
|
|
|
244288 |
|
|
|
244288 |
-#Run PUT for ltarce.
|
|
|
244288 |
-set exec_output [ltrace_runtest $objdir/$subdir $objdir/$subdir/$binfile]
|
|
|
244288 |
+ set count 0
|
|
|
244288 |
+ foreach key [dict keys $d] {
|
|
|
244288 |
+ if [regexp -- $pattern $key] {
|
|
|
244288 |
+ incr count [dict get $d $key]
|
|
|
244288 |
+ }
|
|
|
244288 |
+ }
|
|
|
244288 |
|
|
|
244288 |
-#check the output of this program.
|
|
|
244288 |
-verbose "ltrace runtest output: $exec_output\n"
|
|
|
244288 |
+ set msgMain "$pattern was recorded $count times"
|
|
|
244288 |
|
|
|
244288 |
-if [regexp {ELF from incompatible architecture} $exec_output] {
|
|
|
244288 |
- fail "32-bit ltrace can not perform on 64-bit PUTs and rebuild ltrace in 64 bit mode!"
|
|
|
244288 |
- return
|
|
|
244288 |
-} elseif [ regexp {Couldn't get .hash data} $exec_output ] {
|
|
|
244288 |
- fail "Couldn't get .hash data!"
|
|
|
244288 |
- return
|
|
|
244288 |
+ if {[eval expr $count $op $expect]} {
|
|
|
244288 |
+ pass $msgMain
|
|
|
244288 |
+ } else {
|
|
|
244288 |
+ fail "$msgMain, expected $op $expect"
|
|
|
244288 |
+ }
|
|
|
244288 |
+ }
|
|
|
244288 |
}
|
|
|
244288 |
|
|
|
244288 |
+Match [Diff [Calls [ltraceRun -L -S -- $bin]] \
|
|
|
244288 |
+ [Calls [ltraceRun -L -S -- $empty]]] {
|
|
|
244288 |
+ { {^write$} == 1 }
|
|
|
244288 |
+ { {^unlink(at)?$} >= 2 }
|
|
|
244288 |
+ { {^open(at)?$} == 1 }
|
|
|
244288 |
+ { {^(new|f)?stat(64)?$} == 1 }
|
|
|
244288 |
+ { {^close$} == 1 }
|
|
|
244288 |
+ { {^getcwd$} == 1 }
|
|
|
244288 |
+ { {^chdir$} == 1 }
|
|
|
244288 |
+ { {^symlink(at)?$} == 1 }
|
|
|
244288 |
+ { {^f?access(at)?$} == 1 }
|
|
|
244288 |
+ { {^rename(at)?$} == 1 }
|
|
|
244288 |
+ { {^mkdir(at)?$} == 1 }
|
|
|
244288 |
+}
|
|
|
244288 |
|
|
|
244288 |
-set pattern "^munmap@SYS"
|
|
|
244288 |
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 2
|
|
|
244288 |
-set pattern "^write@SYS"
|
|
|
244288 |
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
|
|
|
244288 |
-set pattern "^unlink@SYS"
|
|
|
244288 |
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
|
|
|
244288 |
-
|
|
|
244288 |
-set pattern "^brk@SYS"
|
|
|
244288 |
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
|
|
|
244288 |
-set pattern "^open@SYS"
|
|
|
244288 |
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
|
|
|
244288 |
-set pattern "^(new)?fstat(64)?@SYS"
|
|
|
244288 |
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1 egrep
|
|
|
244288 |
-set pattern "^(old_)?mmap2?@SYS"
|
|
|
244288 |
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1 egrep
|
|
|
244288 |
-set pattern "^close@SYS"
|
|
|
244288 |
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
|
|
|
244288 |
-
|
|
|
244288 |
-set pattern "^getcwd@SYS"
|
|
|
244288 |
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
|
|
|
244288 |
-set pattern "^chdir@SYS"
|
|
|
244288 |
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
|
|
|
244288 |
-set pattern "^symlink@SYS"
|
|
|
244288 |
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
|
|
|
244288 |
-set pattern "^unlink@SYS"
|
|
|
244288 |
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
|
|
|
244288 |
-set pattern "^(new)?stat(64)?@SYS"
|
|
|
244288 |
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1 egrep
|
|
|
244288 |
-set pattern "^access@SYS"
|
|
|
244288 |
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
|
|
|
244288 |
-set pattern "^rename@SYS"
|
|
|
244288 |
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
|
|
|
244288 |
-set pattern "^mkdir@SYS"
|
|
|
244288 |
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
|
|
|
244288 |
-set pattern "^rmdir@SYS"
|
|
|
244288 |
-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1
|
|
|
244288 |
+ltraceDone
|
|
|
244288 |
diff --git a/testsuite/ltrace.minor/trace-clone.c b/testsuite/ltrace.minor/trace-clone.c
|
|
|
244288 |
index db1936d..ded930c 100644
|
|
|
244288 |
--- a/testsuite/ltrace.minor/trace-clone.c
|
|
|
244288 |
+++ b/testsuite/ltrace.minor/trace-clone.c
|
|
|
244288 |
@@ -8,6 +8,7 @@
|
|
|
244288 |
#include <sys/types.h>
|
|
|
244288 |
#include <stdlib.h>
|
|
|
244288 |
#include <sched.h>
|
|
|
244288 |
+#include <unistd.h>
|
|
|
244288 |
|
|
|
244288 |
int child ()
|
|
|
244288 |
{
|
|
|
244288 |
@@ -22,7 +23,8 @@ typedef int (* myfunc)();
|
|
|
244288 |
int main ()
|
|
|
244288 |
{
|
|
|
244288 |
pid_t pid;
|
|
|
244288 |
- static char stack[STACK_SIZE];
|
|
|
244288 |
+ static __attribute__ ((aligned (16))) char stack[STACK_SIZE];
|
|
|
244288 |
+
|
|
|
244288 |
#ifdef __ia64__
|
|
|
244288 |
pid = __clone2((myfunc)&child, stack, STACK_SIZE, CLONE_FS, NULL);
|
|
|
244288 |
#else
|