diffstat of debian/ for ltrace_0.7.3-4 ltrace_0.7.3-4ubuntu5 changelog | 174 control | 7 patches/Add-missing-include-stdio.h.patch | 30 patches/Implement-aarch64-support.patch | 1945 ++++++++++ patches/Move-get_hfa_type-from-IA64-backend-to-type.c-name-i.patch | 163 patches/Set-child-stack-alignment-in-trace-clone.c.patch | 31 patches/add-missing-stdint.h-include.patch | 20 patches/ppc64el.diff | 575 ++ patches/ptrace.diff | 18 patches/series | 7 rules | 5 11 files changed, 2972 insertions(+), 3 deletions(-) diff -Nru ltrace-0.7.3/debian/changelog ltrace-0.7.3/debian/changelog --- ltrace-0.7.3/debian/changelog 2014-01-03 12:56:56.000000000 +0000 +++ ltrace-0.7.3/debian/changelog 2014-03-20 15:18:55.000000000 +0000 @@ -1,3 +1,41 @@ +ltrace (0.7.3-4ubuntu5) trusty; urgency=medium + + * Build-depend on dh-autoreconf. + + -- Matthias Klose Thu, 20 Mar 2014 16:18:36 +0100 + +ltrace (0.7.3-4ubuntu4) trusty; urgency=medium + + * Add patch to support arm64 (LP: #1292089). + * Include cdbs' autoreconf rules to generate new Makefiles + + -- dann frazier Thu, 13 Mar 2014 10:17:20 -0600 + +ltrace (0.7.3-4ubuntu3) trusty; urgency=medium + + * Update patch to support ppc64el. + + -- Matthias Klose Mon, 24 Feb 2014 16:37:49 +0100 + +ltrace (0.7.3-4ubuntu2) trusty; urgency=medium + + * Add patch to support ppc64el. + + -- Matthias Klose Thu, 09 Jan 2014 16:10:19 +0100 + +ltrace (0.7.3-4ubuntu1) trusty; urgency=medium + + * Merge with Debian; remaining changes: + - Set architecture to linux-any. + - sysdeps/linux-gnu/trace.c: try to make PTRACE scope sysctl more + discoverable. + - Use libelf-dev instead of libelfg0-dev + - Define _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE in debian/rules CFLAGS. + The configure script has a bug where it can't properly cope with the need + to define these before detecting the use of elfutils. + + -- Matthias Klose Mon, 06 Jan 2014 12:57:31 +0100 + ltrace (0.7.3-4) unstable; urgency=low * Get rid of dh_autoreconf (not needed) @@ -49,6 +87,32 @@ -- David Prévot Sat, 21 Dec 2013 19:21:35 -0400 +ltrace (0.5.3-2.1ubuntu3) quantal; urgency=low + + * Rebuild for new armel compiler default of ARMv5t. + + -- Colin Watson Tue, 02 Oct 2012 16:36:36 +0100 + +ltrace (0.5.3-2.1ubuntu2) precise; urgency=low + + * Build for armhf. + + -- Matthias Klose Mon, 05 Dec 2011 16:43:20 +0100 + +ltrace (0.5.3-2.1ubuntu1) natty; urgency=low + + * Merge with Debian; remaining changes: + - Fix ARM syscall_p to handle Thumb-2 mode (Zach Welch). LP: #639796. + - sysdeps/linux-gnu/trace.c: adjust sysctl hint to include new yama path. + - sysdeps/linux-gnu/trace.c: try to make PTRACE scope sysctl more + discoverable. + - Use libelf-dev instead of libelfg0-dev + - Define _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE in debian/rules CFLAGS. + The configure script has a bug where it can't properly cope with the need + to define these before detecting the use of elfutils. + + -- Matthias Klose Wed, 24 Nov 2010 17:58:11 +0100 + ltrace (0.5.3-2.1) unstable; urgency=low * Non-maintainer upload. @@ -57,6 +121,49 @@ -- Jakub Wilk Sun, 02 May 2010 10:27:16 +0200 +ltrace (0.5.3-2ubuntu6) maverick; urgency=low + + * Fix ARM syscall_p to handle Thumb-2 mode (Zach Welch). LP: #639796. + + -- Matthias Klose Fri, 01 Oct 2010 16:06:14 +0200 + +ltrace (0.5.3-2ubuntu5) maverick; urgency=low + + * sysdeps/linux-gnu/trace.c: adjust sysctl hint to include new yama path. + + -- Kees Cook Tue, 06 Jul 2010 15:18:57 -0700 + +ltrace (0.5.3-2ubuntu4) maverick; urgency=low + + * sysdeps/linux-gnu/trace.c: try to make PTRACE scope sysctl more + discoverable. + + -- Kees Cook Wed, 09 Jun 2010 16:49:53 -0700 + +ltrace (0.5.3-2ubuntu3) lucid; urgency=low + + * rebuild rest of main for armel armv7/thumb2 optimization; + UbuntuSpec:mobile-lucid-arm-gcc-v7-thumb2 + + -- Alexander Sack Sun, 07 Mar 2010 00:56:41 +0100 + +ltrace (0.5.3-2ubuntu2) karmic; urgency=low + + * sysdeps/linux-gnu/ppc/plt.c: Include . + + -- Matthias Klose Sun, 27 Sep 2009 14:05:50 +0200 + +ltrace (0.5.3-2ubuntu1) karmic; urgency=low + + * Merge from debian unstable, remaining changes: LP: #404856 + - Add lpia to architecture list. + - Use libelf-dev instead of libelfg0-dev + - Define _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE in debian/rules CFLAGS. + The configure script has a bug where it can't properly cope with the need + to define these before detecting the use of elfutils. + + -- Bhavani Shankar Tue, 28 Jul 2009 16:44:35 +0530 + ltrace (0.5.3-2) unstable; urgency=low * Fixed compilation problems in armel, ia64 and powerpc (closes: Bug#538441) @@ -70,6 +177,17 @@ -- Juan Cespedes Sat, 25 Jul 2009 16:24:38 +0200 +ltrace (0.5.2-2ubuntu1) karmic; urgency=low + + * Merge from debian unstable, remaining changes: + - Add lpia to architecture list. + - Use libelf-dev instead of libelfg0-dev + - Define _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE in debian/rules CFLAGS. + The configure script has a bug where it can't properly cope with the need + to define these before detecting the use of elfutils. + + -- Michael Vogt Wed, 03 Jun 2009 11:03:35 +0200 + ltrace (0.5.2-2) unstable; urgency=low * Make clone() work when child starts after parent finishes @@ -86,6 +204,23 @@ -- Juan Cespedes Thu, 21 May 2009 19:16:22 +0200 +ltrace (0.5.1-2ubuntu1) jaunty; urgency=low + + [ Bhavani Shankar ] + * Merge from debian unstable, remaining changes: LP: #313530 + - Add lpia to architecture list. + - Use libelf-dev instead of libelfg0-dev + - Define _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE in debian/rules CFLAGS. + The configure script has a bug where it can't properly cope with the need + to define these before detecting the use of elfutils. + + [ Colin Watson ] + * Remove stray dpatch build-dependency. + * Change libelfg0-dev to libelf-dev in debian/control.in as well as in + debian/control. + + -- Bhavani Shankar Tue, 06 Jan 2009 17:46:28 +0000 + ltrace (0.5.1-2) unstable; urgency=low * Red-added armel and armeb to debian/control (closes: Bug#463023) @@ -101,6 +236,23 @@ -- Juan Cespedes Wed, 10 Dec 2008 18:41:20 +0100 +ltrace (0.5-3.1ubuntu2) intrepid; urgency=low + + * Use libelf-dev instead of libelfg0-dev + * Define _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE in debian/rules CFLAGS. + The configure script has a bug where it can't properly cope with the need + to define these before detecting the use of elfutils. + + -- Ben Collins Wed, 02 Jul 2008 11:10:41 -0400 + +ltrace (0.5-3.1ubuntu1) intrepid; urgency=low + + * Merge from debian unstable, remaining changes: + - Add lpia to architecture list. + - Fix check for host_os in configure. + + -- Michael Vogt Tue, 27 May 2008 10:51:22 +0200 + ltrace (0.5-3.1) unstable; urgency=low * Non-maintainer upload. @@ -116,6 +268,15 @@ -- Riku Voipio Tue, 29 Jan 2008 00:26:50 +0200 +ltrace (0.5-3ubuntu1) hardy; urgency=low + + * Merge from debian unstable, remaining changes: + - Add lpia to architecture list. + - Set Ubuntu maintainer address. + - Fix check for host_os in configure. + + -- Michael Vogt Thu, 15 Nov 2007 12:47:01 +0100 + ltrace (0.5-3) unstable; urgency=low * Really fix compilation problems in ppc (!) @@ -144,6 +305,19 @@ -- Juan Cespedes Tue, 07 Aug 2007 11:49:27 +0200 +ltrace (0.4-1ubuntu2) gutsy; urgency=low + + * Fix check for host_os in configure. + + -- Matthias Klose Tue, 31 Jul 2007 08:13:07 +0000 + +ltrace (0.4-1ubuntu1) gutsy; urgency=low + + * Add lpia to architecture list. + * Set Ubuntu maintainer address. + + -- Matthias Klose Mon, 30 Jul 2007 23:56:37 +0200 + ltrace (0.4-1) unstable; urgency=low * Rebase code from Redhat patches, now everything lives in SVN diff -Nru ltrace-0.7.3/debian/control ltrace-0.7.3/debian/control --- ltrace-0.7.3/debian/control 2014-01-03 12:01:17.000000000 +0000 +++ ltrace-0.7.3/debian/control 2014-03-20 15:19:16.000000000 +0000 @@ -1,12 +1,13 @@ Source: ltrace Section: utils Priority: optional -Maintainer: Juan Cespedes +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Juan Cespedes Standards-Version: 3.9.5 -Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 7), libiberty-dev, libelfg0-dev, libselinux1-dev +Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 7), dh-autoreconf, libiberty-dev, libelf-dev, libselinux1-dev Package: ltrace -Architecture: alpha amd64 arm armeb armel armhf ia64 i386 mips mipsel powerpc powerpcspe ppc64 s390 s390x sparc +Architecture: linux-any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Tracks runtime library calls in dynamically linked programs ltrace is a debugging program which runs a specified command until it diff -Nru ltrace-0.7.3/debian/patches/Add-missing-include-stdio.h.patch ltrace-0.7.3/debian/patches/Add-missing-include-stdio.h.patch --- ltrace-0.7.3/debian/patches/Add-missing-include-stdio.h.patch 1970-01-01 00:00:00.000000000 +0000 +++ ltrace-0.7.3/debian/patches/Add-missing-include-stdio.h.patch 2014-03-20 14:49:16.000000000 +0000 @@ -0,0 +1,30 @@ +Author: dann frazier +Description: Add missing #include stdio.h + Include stdio.h in files that use fprintf() +Applied-Upstream: http://anonscm.debian.org/gitweb/?p=collab-maint/ltrace.git;a=commitdiff;h=3c4a0de0be06377caf43a5f9e1682b05ef7299f9 +Last-Update: 2014-03-17 + +Index: ltrace/sysdeps/linux-gnu/aarch64/regs.c +=================================================================== +--- ltrace.orig/sysdeps/linux-gnu/aarch64/regs.c 2014-03-12 16:23:25.382866486 -0600 ++++ ltrace/sysdeps/linux-gnu/aarch64/regs.c 2014-03-12 16:26:20.989198876 -0600 +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + #include "backend.h" + #include "proc.h" +Index: ltrace/sysdeps/linux-gnu/aarch64/trace.c +=================================================================== +--- ltrace.orig/sysdeps/linux-gnu/aarch64/trace.c 2014-03-12 16:23:25.382866486 -0600 ++++ ltrace/sysdeps/linux-gnu/aarch64/trace.c 2014-03-12 16:26:20.989198876 -0600 +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + #include + + #include "backend.h" diff -Nru ltrace-0.7.3/debian/patches/Implement-aarch64-support.patch ltrace-0.7.3/debian/patches/Implement-aarch64-support.patch --- ltrace-0.7.3/debian/patches/Implement-aarch64-support.patch 1970-01-01 00:00:00.000000000 +0000 +++ ltrace-0.7.3/debian/patches/Implement-aarch64-support.patch 2014-03-20 14:49:16.000000000 +0000 @@ -0,0 +1,1945 @@ +Author: Petr Machata +Description: Set child stack alignment in trace-clone.c + This is important on aarch64, which requires 16-byte aligned + stack pointer. This might be relevant on other arches as well, + I suspect we just happened to get the 16-byte boundary in some + cases. +Applied-Upstream: http://anonscm.debian.org/gitweb/?p=collab-maint/ltrace.git;a=commit;h=912a0f75b3521803fa724a55f0e883c134c7b4e9 +Last-Update: 2014-03-13 + +Index: ltrace/configure.ac +=================================================================== +--- ltrace.orig/configure.ac 2014-03-12 16:20:44.020676662 -0600 ++++ ltrace/configure.ac 2014-03-12 16:20:44.012676553 -0600 +@@ -1,6 +1,6 @@ + # -*- Autoconf -*- + # This file is part of ltrace. +-# Copyright (C) 2010,2013 Petr Machata, Red Hat Inc. ++# Copyright (C) 2010,2013,2014 Petr Machata, Red Hat Inc. + # Copyright (C) 2010,2011 Joe Damato + # Copyright (C) 2010 Marc Kleine-Budde + # Copyright (C) 2010 Zachary T Welch +@@ -319,6 +319,7 @@ + Makefile + sysdeps/Makefile + sysdeps/linux-gnu/Makefile ++ sysdeps/linux-gnu/aarch64/Makefile + sysdeps/linux-gnu/alpha/Makefile + sysdeps/linux-gnu/arm/Makefile + sysdeps/linux-gnu/cris/Makefile +Index: ltrace/sysdeps/linux-gnu/Makefile.am +=================================================================== +--- ltrace.orig/sysdeps/linux-gnu/Makefile.am 2014-03-12 16:20:44.020676662 -0600 ++++ ltrace/sysdeps/linux-gnu/Makefile.am 2014-03-12 16:20:44.016676607 -0600 +@@ -1,4 +1,5 @@ + # This file is part of ltrace. ++# Copyright (C) 2014 Petr Machata, Red Hat, Inc. + # Copyright (C) 2010,2012 Marc Kleine-Budde, Pengutronix + # + # This program is free software; you can redistribute it and/or +@@ -16,7 +17,7 @@ + # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + # 02110-1301 USA + +-DIST_SUBDIRS = alpha arm cris ia64 m68k mips ppc s390 sparc x86 ++DIST_SUBDIRS = aarch64 alpha arm cris ia64 m68k mips ppc s390 sparc x86 + + SUBDIRS = \ + $(HOST_CPU) +Index: ltrace/sysdeps/linux-gnu/aarch64/Makefile.am +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ ltrace/sysdeps/linux-gnu/aarch64/Makefile.am 2014-03-12 16:20:44.016676607 -0600 +@@ -0,0 +1,25 @@ ++# This file is part of ltrace. ++# Copyright (C) 2014 Petr Machata, Red Hat, Inc. ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation; either version 2 of the ++# License, or (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++# 02110-1301 USA ++ ++noinst_LTLIBRARIES = ../libcpu.la ++ ++___libcpu_la_SOURCES = fetch.c plt.c regs.c trace.c ++ ++noinst_HEADERS = arch.h ptrace.h signalent.h syscallent.h ++ ++MAINTAINERCLEANFILES = Makefile.in +Index: ltrace/sysdeps/linux-gnu/aarch64/arch.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ ltrace/sysdeps/linux-gnu/aarch64/arch.h 2014-03-12 16:20:44.016676607 -0600 +@@ -0,0 +1,37 @@ ++/* ++ * This file is part of ltrace. ++ * Copyright (C) 2014 Petr Machata, Red Hat, Inc. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++ * 02110-1301 USA ++ */ ++#ifndef LTRACE_AARCH64_ARCH_H ++#define LTRACE_AARCH64_ARCH_H ++ ++/* | 31 21 | 20 5 | 4 0 | * ++ * | 1 1 0 1 0 1 0 0 0 0 1 | imm16 | 0 0 0 0 0 | */ ++#define BREAKPOINT_VALUE { 0xd4, 0x20, 0, 0 } ++#define BREAKPOINT_LENGTH 4 ++#define DECR_PC_AFTER_BREAK 0 ++ ++#define LT_ELFCLASS ELFCLASS64 ++#define LT_ELF_MACHINE EM_AARCH64 ++ ++#define ARCH_HAVE_FETCH_ARG ++#define ARCH_ENDIAN_BIG ++#define ARCH_HAVE_SIZEOF ++#define ARCH_HAVE_ALIGNOF ++ ++#endif /* LTRACE_AARCH64_ARCH_H */ +Index: ltrace/sysdeps/linux-gnu/aarch64/fetch.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ ltrace/sysdeps/linux-gnu/aarch64/fetch.c 2014-03-12 16:23:25.382866486 -0600 +@@ -0,0 +1,365 @@ ++/* ++ * This file is part of ltrace. ++ * Copyright (C) 2014 Petr Machata, Red Hat, Inc. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++ * 02110-1301 USA ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include "fetch.h" ++#include "proc.h" ++#include "type.h" ++#include "value.h" ++ ++int aarch64_read_gregs(struct Process *proc, struct user_pt_regs *regs); ++int aarch64_read_fregs(struct Process *proc, struct user_fpsimd_state *regs); ++ ++ ++struct fetch_context ++{ ++ struct user_pt_regs gregs; ++ struct user_fpsimd_state fpregs; ++ arch_addr_t nsaa; ++ unsigned ngrn; ++ unsigned nsrn; ++ arch_addr_t x8; ++}; ++ ++static int ++context_init(struct fetch_context *context, struct Process *proc) ++{ ++ if (aarch64_read_gregs(proc, &context->gregs) < 0 ++ || aarch64_read_fregs(proc, &context->fpregs) < 0) ++ return -1; ++ ++ context->ngrn = 0; ++ context->nsrn = 0; ++ /* XXX double cast */ ++ context->nsaa = (arch_addr_t) (uintptr_t) context->gregs.sp; ++ context->x8 = 0; ++ ++ return 0; ++} ++ ++struct fetch_context * ++arch_fetch_arg_clone(struct Process *proc, struct fetch_context *context) ++{ ++ struct fetch_context *ret = malloc(sizeof(*ret)); ++ if (ret == NULL) ++ return NULL; ++ return memcpy(ret, context, sizeof(*ret)); ++} ++ ++static void ++fetch_next_gpr(struct fetch_context *context, unsigned char *buf) ++{ ++ uint64_t u = context->gregs.regs[context->ngrn++]; ++ memcpy(buf, &u, 8); ++} ++ ++static int ++fetch_gpr(struct fetch_context *context, struct value *value, size_t sz) ++{ ++ if (sz < 8) ++ sz = 8; ++ ++ unsigned char *buf = value_reserve(value, sz); ++ if (buf == NULL) ++ return -1; ++ ++ size_t i; ++ for (i = 0; i < sz; i += 8) ++ fetch_next_gpr(context, buf + i); ++ ++ return 0; ++} ++ ++static void ++fetch_next_sse(struct fetch_context *context, unsigned char *buf, size_t sz) ++{ ++ __int128 u = context->fpregs.vregs[context->nsrn++]; ++ memcpy(buf, &u, sz); ++} ++ ++static int ++fetch_sse(struct fetch_context *context, struct value *value, size_t sz) ++{ ++ unsigned char *buf = value_reserve(value, sz); ++ if (buf == NULL) ++ return -1; ++ ++ fetch_next_sse(context, buf, sz); ++ return 0; ++} ++ ++static int ++fetch_hfa(struct fetch_context *context, ++ struct value *value, struct arg_type_info *hfa_t, size_t count) ++{ ++ size_t sz = type_sizeof(value->inferior, hfa_t); ++ unsigned char *buf = value_reserve(value, sz * count); ++ if (buf == NULL) ++ return -1; ++ ++ size_t i; ++ for (i = 0; i < count; ++i) { ++ fetch_next_sse(context, buf, sz); ++ buf += sz; ++ } ++ return 0; ++} ++ ++static int ++fetch_stack(struct fetch_context *context, struct value *value, ++ size_t align, size_t sz) ++{ ++ if (align < 8) ++ align = 8; ++ size_t amount = ((sz + align - 1) / align) * align; ++ ++ /* XXX double casts */ ++ uintptr_t sp = (uintptr_t) context->nsaa; ++ sp = ((sp + align - 1) / align) * align; ++ ++ value_in_inferior(value, (arch_addr_t) sp); ++ ++ sp += amount; ++ context->nsaa = (arch_addr_t) sp; ++ ++ return 0; ++} ++ ++enum convert_method { ++ CVT_ERR = -1, ++ CVT_NOP = 0, ++ CVT_BYREF, ++}; ++ ++enum fetch_method { ++ FETCH_NOP, ++ FETCH_STACK, ++ FETCH_GPR, ++ FETCH_SSE, ++ FETCH_HFA, ++}; ++ ++struct fetch_script { ++ enum convert_method c; ++ enum fetch_method f; ++ size_t sz; ++ struct arg_type_info *hfa_t; ++ size_t count; ++}; ++ ++static struct fetch_script ++pass_arg(struct fetch_context const *context, ++ struct Process *proc, struct arg_type_info *info) ++{ ++ enum fetch_method cvt = CVT_NOP; ++ ++ size_t sz = type_sizeof(proc, info); ++ if (sz == (size_t) -1) ++ return (struct fetch_script) { CVT_ERR, FETCH_NOP, sz }; ++ ++ switch (info->type) { ++ case ARGTYPE_VOID: ++ return (struct fetch_script) { cvt, FETCH_NOP, sz }; ++ ++ case ARGTYPE_STRUCT: ++ case ARGTYPE_ARRAY:; ++ size_t count; ++ struct arg_type_info *hfa_t = type_get_hfa_type(info, &count); ++ if (hfa_t != NULL && count <= 4) { ++ if (context->nsrn + count <= 8) ++ return (struct fetch_script) ++ { cvt, FETCH_HFA, sz, hfa_t, count }; ++ return (struct fetch_script) ++ { cvt, FETCH_STACK, sz, hfa_t, count }; ++ } ++ ++ if (sz <= 16) { ++ size_t count = sz / 8; ++ if (context->ngrn + count <= 8) ++ return (struct fetch_script) ++ { cvt, FETCH_GPR, sz }; ++ } ++ ++ cvt = CVT_BYREF; ++ sz = 8; ++ /* Fall through. */ ++ ++ case ARGTYPE_POINTER: ++ case ARGTYPE_INT: ++ case ARGTYPE_UINT: ++ case ARGTYPE_LONG: ++ case ARGTYPE_ULONG: ++ case ARGTYPE_CHAR: ++ case ARGTYPE_SHORT: ++ case ARGTYPE_USHORT: ++ if (context->ngrn < 8 && sz <= 8) ++ return (struct fetch_script) { cvt, FETCH_GPR, sz }; ++ /* We don't support types wider than 8 bytes as of ++ * now. */ ++ assert(sz <= 8); ++ ++ return (struct fetch_script) { cvt, FETCH_STACK, sz }; ++ ++ case ARGTYPE_FLOAT: ++ case ARGTYPE_DOUBLE: ++ if (context->nsrn < 8) { ++ /* ltrace doesn't support float128. */ ++ assert(sz <= 8); ++ return (struct fetch_script) { cvt, FETCH_SSE, sz }; ++ } ++ ++ return (struct fetch_script) { cvt, FETCH_STACK, sz }; ++ } ++ ++ assert(! "Failed to allocate argument."); ++ abort(); ++} ++ ++static int ++convert_arg(struct value *value, struct fetch_script how) ++{ ++ switch (how.c) { ++ case CVT_NOP: ++ return 0; ++ case CVT_BYREF: ++ return value_pass_by_reference(value); ++ case CVT_ERR: ++ return -1; ++ } ++ ++ assert(! "Don't know how to convert argument."); ++ abort(); ++} ++ ++static int ++fetch_arg(struct fetch_context *context, ++ struct Process *proc, struct arg_type_info *info, ++ struct value *value, struct fetch_script how) ++{ ++ if (convert_arg(value, how) < 0) ++ return -1; ++ ++ switch (how.f) { ++ case FETCH_NOP: ++ return 0; ++ ++ case FETCH_STACK: ++ if (how.hfa_t != NULL && how.count != 0 && how.count <= 8) ++ context->nsrn = 8; ++ return fetch_stack(context, value, ++ type_alignof(proc, info), how.sz); ++ ++ case FETCH_GPR: ++ return fetch_gpr(context, value, how.sz); ++ ++ case FETCH_SSE: ++ return fetch_sse(context, value, how.sz); ++ ++ case FETCH_HFA: ++ return fetch_hfa(context, value, how.hfa_t, how.count); ++ } ++ ++ assert(! "Don't know how to fetch argument."); ++ abort(); ++} ++ ++struct fetch_context * ++arch_fetch_arg_init(enum tof type, struct Process *proc, ++ struct arg_type_info *ret_info) ++{ ++ struct fetch_context *context = malloc(sizeof *context); ++ if (context == NULL || context_init(context, proc) < 0) { ++ fail: ++ free(context); ++ return NULL; ++ } ++ ++ /* There's a provision in ARMv8 parameter passing convention ++ * for returning types that, if passed as first argument to a ++ * function, would be passed on stack. For those types, x8 ++ * contains an address where the return argument should be ++ * placed. The callee doesn't need to preserve the value of ++ * x8, so we need to fetch it now. ++ * ++ * To my knowledge, there are currently no types where this ++ * holds, but the code is here, utterly untested. */ ++ ++ struct fetch_script how = pass_arg(context, proc, ret_info); ++ if (how.c == CVT_ERR) ++ goto fail; ++ if (how.c == CVT_NOP && how.f == FETCH_STACK) { ++ /* XXX double cast. */ ++ context->x8 = (arch_addr_t) (uintptr_t) context->gregs.regs[8]; ++ /* See the comment above about the assert. */ ++ assert(! "Unexpected: first argument passed on stack."); ++ abort(); ++ } ++ ++ return context; ++} ++ ++int ++arch_fetch_arg_next(struct fetch_context *context, enum tof type, ++ struct Process *proc, struct arg_type_info *info, ++ struct value *value) ++{ ++ return fetch_arg(context, proc, info, value, ++ pass_arg(context, proc, info)); ++} ++ ++int ++arch_fetch_retval(struct fetch_context *context, enum tof type, ++ struct Process *proc, struct arg_type_info *info, ++ struct value *value) ++{ ++ if (context->x8 != 0) { ++ value_in_inferior(value, context->x8); ++ return 0; ++ } ++ ++ if (context_init(context, proc) < 0) ++ return -1; ++ ++ return fetch_arg(context, proc, info, value, ++ pass_arg(context, proc, info)); ++} ++ ++void ++arch_fetch_arg_done(struct fetch_context *context) ++{ ++ if (context != NULL) ++ free(context); ++} ++ ++size_t ++arch_type_sizeof(struct Process *proc, struct arg_type_info *arg) ++{ ++ return (size_t) -2; ++} ++ ++size_t ++arch_type_alignof(struct Process *proc, struct arg_type_info *arg) ++{ ++ return (size_t) -2; ++} +Index: ltrace/sysdeps/linux-gnu/aarch64/plt.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ ltrace/sysdeps/linux-gnu/aarch64/plt.c 2014-03-12 16:23:25.382866486 -0600 +@@ -0,0 +1,38 @@ ++/* ++ * This file is part of ltrace. ++ * Copyright (C) 2014 Petr Machata, Red Hat, Inc. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++ * 02110-1301 USA ++ */ ++ ++#include ++ ++#include "backend.h" ++#include "proc.h" ++#include "library.h" ++#include "ltrace-elf.h" ++ ++arch_addr_t ++sym2addr(struct Process *proc, struct library_symbol *sym) ++{ ++ return sym->enter_addr; ++} ++ ++GElf_Addr ++arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela *rela) ++{ ++ return lte->plt_addr + 32 + ndx * 16; ++} +Index: ltrace/sysdeps/linux-gnu/aarch64/ptrace.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ ltrace/sysdeps/linux-gnu/aarch64/ptrace.h 2014-03-12 16:20:44.016676607 -0600 +@@ -0,0 +1,22 @@ ++/* ++ * This file is part of ltrace. ++ * Copyright (C) 2014 Petr Machata, Red Hat, Inc. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++ * 02110-1301 USA ++ */ ++ ++#include ++#include +Index: ltrace/sysdeps/linux-gnu/aarch64/regs.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ ltrace/sysdeps/linux-gnu/aarch64/regs.c 2014-03-12 16:23:25.382866486 -0600 +@@ -0,0 +1,130 @@ ++/* ++ * This file is part of ltrace. ++ * Copyright (C) 2014 Petr Machata, Red Hat, Inc. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++ * 02110-1301 USA ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include "backend.h" ++#include "proc.h" ++ ++#define PC_OFF (32 * 4) ++ ++int ++aarch64_read_gregs(struct Process *proc, struct user_pt_regs *regs) ++{ ++ *regs = (struct user_pt_regs) {}; ++ struct iovec iovec; ++ iovec.iov_base = regs; ++ iovec.iov_len = sizeof *regs; ++ return ptrace(PTRACE_GETREGSET, proc->pid, NT_PRSTATUS, &iovec) < 0 ++ ? -1 : 0; ++} ++ ++int ++aarch64_write_gregs(struct Process *proc, struct user_pt_regs *regs) ++{ ++ struct iovec iovec; ++ iovec.iov_base = regs; ++ iovec.iov_len = sizeof *regs; ++ return ptrace(PTRACE_SETREGSET, proc->pid, NT_PRSTATUS, &iovec) < 0 ++ ? -1 : 0; ++} ++ ++int ++aarch64_read_fregs(struct Process *proc, struct user_fpsimd_state *regs) ++{ ++ *regs = (struct user_fpsimd_state) {}; ++ struct iovec iovec; ++ iovec.iov_base = regs; ++ iovec.iov_len = sizeof *regs; ++ return ptrace(PTRACE_GETREGSET, proc->pid, NT_FPREGSET, &iovec) < 0 ++ ? -1 : 0; ++} ++ ++arch_addr_t ++get_instruction_pointer(struct Process *proc) ++{ ++ struct user_pt_regs regs; ++ if (aarch64_read_gregs(proc, ®s) < 0) { ++ fprintf(stderr, "get_instruction_pointer: " ++ "Couldn't read registers of %d.\n", proc->pid); ++ return 0; ++ } ++ ++ /* ++ char buf[128]; ++ sprintf(buf, "cat /proc/%d/maps", proc->pid); ++ system(buf); ++ */ ++ ++ /* XXX double cast */ ++ return (arch_addr_t) (uintptr_t) regs.pc; ++} ++ ++void ++set_instruction_pointer(struct Process *proc, arch_addr_t addr) ++{ ++ struct user_pt_regs regs; ++ if (aarch64_read_gregs(proc, ®s) < 0) { ++ fprintf(stderr, "get_instruction_pointer: " ++ "Couldn't read registers of %d.\n", proc->pid); ++ return; ++ } ++ ++ /* XXX double cast */ ++ regs.pc = (uint64_t) (uintptr_t) addr; ++ ++ if (aarch64_write_gregs(proc, ®s) < 0) { ++ fprintf(stderr, "get_instruction_pointer: " ++ "Couldn't write registers of %d.\n", proc->pid); ++ return; ++ } ++} ++ ++arch_addr_t ++get_stack_pointer(struct Process *proc) ++{ ++ struct user_pt_regs regs; ++ if (aarch64_read_gregs(proc, ®s) < 0) { ++ fprintf(stderr, "get_stack_pointer: " ++ "Couldn't read registers of %d.\n", proc->pid); ++ return 0; ++ } ++ ++ /* XXX double cast */ ++ return (arch_addr_t) (uintptr_t) regs.sp; ++} ++ ++arch_addr_t ++get_return_addr(struct Process *proc, arch_addr_t stack_pointer) ++{ ++ struct user_pt_regs regs; ++ if (aarch64_read_gregs(proc, ®s) < 0) { ++ fprintf(stderr, "get_return_addr: " ++ "Couldn't read registers of %d.\n", proc->pid); ++ return 0; ++ } ++ ++ /* XXX double cast */ ++ return (arch_addr_t) (uintptr_t) regs.regs[30]; ++} +Index: ltrace/sysdeps/linux-gnu/aarch64/signalent.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ ltrace/sysdeps/linux-gnu/aarch64/signalent.h 2014-03-12 16:20:44.016676607 -0600 +@@ -0,0 +1,52 @@ ++/* ++ * This file is part of ltrace. ++ * Copyright (C) 2006 Ian Wienand ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++ * 02110-1301 USA ++ */ ++ ++ "SIG_0", /* 0 */ ++ "SIGHUP", /* 1 */ ++ "SIGINT", /* 2 */ ++ "SIGQUIT", /* 3 */ ++ "SIGILL", /* 4 */ ++ "SIGTRAP", /* 5 */ ++ "SIGABRT", /* 6 */ ++ "SIGBUS", /* 7 */ ++ "SIGFPE", /* 8 */ ++ "SIGKILL", /* 9 */ ++ "SIGUSR1", /* 10 */ ++ "SIGSEGV", /* 11 */ ++ "SIGUSR2", /* 12 */ ++ "SIGPIPE", /* 13 */ ++ "SIGALRM", /* 14 */ ++ "SIGTERM", /* 15 */ ++ "SIGSTKFLT", /* 16 */ ++ "SIGCHLD", /* 17 */ ++ "SIGCONT", /* 18 */ ++ "SIGSTOP", /* 19 */ ++ "SIGTSTP", /* 20 */ ++ "SIGTTIN", /* 21 */ ++ "SIGTTOU", /* 22 */ ++ "SIGURG", /* 23 */ ++ "SIGXCPU", /* 24 */ ++ "SIGXFSZ", /* 25 */ ++ "SIGVTALRM", /* 26 */ ++ "SIGPROF", /* 27 */ ++ "SIGWINCH", /* 28 */ ++ "SIGIO", /* 29 */ ++ "SIGPWR", /* 30 */ ++ "SIGSYS", /* 31 */ +Index: ltrace/sysdeps/linux-gnu/aarch64/syscallent.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ ltrace/sysdeps/linux-gnu/aarch64/syscallent.h 2014-03-12 16:20:44.016676607 -0600 +@@ -0,0 +1,1100 @@ ++/* ++ * This file is part of ltrace. ++ * Copyright (C) 2014 Petr Machata, Red Hat, Inc. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++ * 02110-1301 USA ++ */ ++ ++ "io_setup", /* 0 */ ++ "io_destroy", /* 1 */ ++ "io_submit", /* 2 */ ++ "io_cancel", /* 3 */ ++ "io_getevents", /* 4 */ ++ "setxattr", /* 5 */ ++ "lsetxattr", /* 6 */ ++ "fsetxattr", /* 7 */ ++ "getxattr", /* 8 */ ++ "lgetxattr", /* 9 */ ++ "fgetxattr", /* 10 */ ++ "listxattr", /* 11 */ ++ "llistxattr", /* 12 */ ++ "flistxattr", /* 13 */ ++ "removexattr", /* 14 */ ++ "lremovexattr", /* 15 */ ++ "fremovexattr", /* 16 */ ++ "getcwd", /* 17 */ ++ "lookup_dcookie", /* 18 */ ++ "eventfd2", /* 19 */ ++ "epoll_create1", /* 20 */ ++ "epoll_ctl", /* 21 */ ++ "epoll_pwait", /* 22 */ ++ "dup", /* 23 */ ++ "dup3", /* 24 */ ++ "fcntl", /* 25 */ ++ "inotify_init1", /* 26 */ ++ "inotify_add_watch", /* 27 */ ++ "inotify_rm_watch", /* 28 */ ++ "ioctl", /* 29 */ ++ "ioprio_set", /* 30 */ ++ "ioprio_get", /* 31 */ ++ "flock", /* 32 */ ++ "mknodat", /* 33 */ ++ "mkdirat", /* 34 */ ++ "unlinkat", /* 35 */ ++ "symlinkat", /* 36 */ ++ "linkat", /* 37 */ ++ "renameat", /* 38 */ ++ "umount2", /* 39 */ ++ "mount", /* 40 */ ++ "pivot_root", /* 41 */ ++ "nfsservctl", /* 42 */ ++ "statfs", /* 43 */ ++ "fstatfs", /* 44 */ ++ "truncate", /* 45 */ ++ "ftruncate", /* 46 */ ++ "fallocate", /* 47 */ ++ "faccessat", /* 48 */ ++ "chdir", /* 49 */ ++ "fchdir", /* 50 */ ++ "chroot", /* 51 */ ++ "fchmod", /* 52 */ ++ "fchmodat", /* 53 */ ++ "fchownat", /* 54 */ ++ "fchown", /* 55 */ ++ "openat", /* 56 */ ++ "close", /* 57 */ ++ "vhangup", /* 58 */ ++ "pipe2", /* 59 */ ++ "quotactl", /* 60 */ ++ "getdents64", /* 61 */ ++ "lseek", /* 62 */ ++ "read", /* 63 */ ++ "write", /* 64 */ ++ "readv", /* 65 */ ++ "writev", /* 66 */ ++ "pread64", /* 67 */ ++ "pwrite64", /* 68 */ ++ "preadv", /* 69 */ ++ "pwritev", /* 70 */ ++ "sendfile", /* 71 */ ++ "pselect6", /* 72 */ ++ "ppoll", /* 73 */ ++ "signalfd4", /* 74 */ ++ "vmsplice", /* 75 */ ++ "splice", /* 76 */ ++ "tee", /* 77 */ ++ "readlinkat", /* 78 */ ++ "fstatat", /* 79 */ ++ "fstat", /* 80 */ ++ "sync", /* 81 */ ++ "fsync", /* 82 */ ++ "fdatasync", /* 83 */ ++ "sync_file_range", /* 84 */ ++ "timerfd_create", /* 85 */ ++ "timerfd_settime", /* 86 */ ++ "timerfd_gettime", /* 87 */ ++ "utimensat", /* 88 */ ++ "acct", /* 89 */ ++ "capget", /* 90 */ ++ "capset", /* 91 */ ++ "personality", /* 92 */ ++ "exit", /* 93 */ ++ "exit_group", /* 94 */ ++ "waitid", /* 95 */ ++ "set_tid_address", /* 96 */ ++ "unshare", /* 97 */ ++ "futex", /* 98 */ ++ "set_robust_list", /* 99 */ ++ "get_robust_list", /* 100 */ ++ "nanosleep", /* 101 */ ++ "getitimer", /* 102 */ ++ "setitimer", /* 103 */ ++ "kexec_load", /* 104 */ ++ "init_module", /* 105 */ ++ "delete_module", /* 106 */ ++ "timer_create", /* 107 */ ++ "timer_gettime", /* 108 */ ++ "timer_getoverrun", /* 109 */ ++ "timer_settime", /* 110 */ ++ "timer_delete", /* 111 */ ++ "clock_settime", /* 112 */ ++ "clock_gettime", /* 113 */ ++ "clock_getres", /* 114 */ ++ "clock_nanosleep", /* 115 */ ++ "syslog", /* 116 */ ++ "ptrace", /* 117 */ ++ "sched_setparam", /* 118 */ ++ "sched_setscheduler", /* 119 */ ++ "sched_getscheduler", /* 120 */ ++ "sched_getparam", /* 121 */ ++ "sched_setaffinity", /* 122 */ ++ "sched_getaffinity", /* 123 */ ++ "sched_yield", /* 124 */ ++ "sched_get_priority_max", /* 125 */ ++ "sched_get_priority_min", /* 126 */ ++ "sched_rr_get_interval", /* 127 */ ++ "restart_syscall", /* 128 */ ++ "kill", /* 129 */ ++ "tkill", /* 130 */ ++ "tgkill", /* 131 */ ++ "sigaltstack", /* 132 */ ++ "rt_sigsuspend", /* 133 */ ++ "rt_sigaction", /* 134 */ ++ "rt_sigprocmask", /* 135 */ ++ "rt_sigpending", /* 136 */ ++ "rt_sigtimedwait", /* 137 */ ++ "rt_sigqueueinfo", /* 138 */ ++ "rt_sigreturn", /* 139 */ ++ "setpriority", /* 140 */ ++ "getpriority", /* 141 */ ++ "reboot", /* 142 */ ++ "setregid", /* 143 */ ++ "setgid", /* 144 */ ++ "setreuid", /* 145 */ ++ "setuid", /* 146 */ ++ "setresuid", /* 147 */ ++ "getresuid", /* 148 */ ++ "setresgid", /* 149 */ ++ "getresgid", /* 150 */ ++ "setfsuid", /* 151 */ ++ "setfsgid", /* 152 */ ++ "times", /* 153 */ ++ "setpgid", /* 154 */ ++ "getpgid", /* 155 */ ++ "getsid", /* 156 */ ++ "setsid", /* 157 */ ++ "getgroups", /* 158 */ ++ "setgroups", /* 159 */ ++ "uname", /* 160 */ ++ "sethostname", /* 161 */ ++ "setdomainname", /* 162 */ ++ "getrlimit", /* 163 */ ++ "setrlimit", /* 164 */ ++ "getrusage", /* 165 */ ++ "umask", /* 166 */ ++ "prctl", /* 167 */ ++ "getcpu", /* 168 */ ++ "gettimeofday", /* 169 */ ++ "settimeofday", /* 170 */ ++ "adjtimex", /* 171 */ ++ "getpid", /* 172 */ ++ "getppid", /* 173 */ ++ "getuid", /* 174 */ ++ "geteuid", /* 175 */ ++ "getgid", /* 176 */ ++ "getegid", /* 177 */ ++ "gettid", /* 178 */ ++ "sysinfo", /* 179 */ ++ "mq_open", /* 180 */ ++ "mq_unlink", /* 181 */ ++ "mq_timedsend", /* 182 */ ++ "mq_timedreceive", /* 183 */ ++ "mq_notify", /* 184 */ ++ "mq_getsetattr", /* 185 */ ++ "msgget", /* 186 */ ++ "msgctl", /* 187 */ ++ "msgrcv", /* 188 */ ++ "msgsnd", /* 189 */ ++ "semget", /* 190 */ ++ "semctl", /* 191 */ ++ "semtimedop", /* 192 */ ++ "semop", /* 193 */ ++ "shmget", /* 194 */ ++ "shmctl", /* 195 */ ++ "shmat", /* 196 */ ++ "shmdt", /* 197 */ ++ "socket", /* 198 */ ++ "socketpair", /* 199 */ ++ "bind", /* 200 */ ++ "listen", /* 201 */ ++ "accept", /* 202 */ ++ "connect", /* 203 */ ++ "getsockname", /* 204 */ ++ "getpeername", /* 205 */ ++ "sendto", /* 206 */ ++ "recvfrom", /* 207 */ ++ "setsockopt", /* 208 */ ++ "getsockopt", /* 209 */ ++ "shutdown", /* 210 */ ++ "sendmsg", /* 211 */ ++ "recvmsg", /* 212 */ ++ "readahead", /* 213 */ ++ "brk", /* 214 */ ++ "munmap", /* 215 */ ++ "mremap", /* 216 */ ++ "add_key", /* 217 */ ++ "request_key", /* 218 */ ++ "keyctl", /* 219 */ ++ "clone", /* 220 */ ++ "execve", /* 221 */ ++ "mmap", /* 222 */ ++ "fadvise64", /* 223 */ ++ "swapon", /* 224 */ ++ "swapoff", /* 225 */ ++ "mprotect", /* 226 */ ++ "msync", /* 227 */ ++ "mlock", /* 228 */ ++ "munlock", /* 229 */ ++ "mlockall", /* 230 */ ++ "munlockall", /* 231 */ ++ "mincore", /* 232 */ ++ "madvise", /* 233 */ ++ "remap_file_pages", /* 234 */ ++ "mbind", /* 235 */ ++ "get_mempolicy", /* 236 */ ++ "set_mempolicy", /* 237 */ ++ "migrate_pages", /* 238 */ ++ "move_pages", /* 239 */ ++ "rt_tgsigqueueinfo", /* 240 */ ++ "perf_event_open", /* 241 */ ++ "accept4", /* 242 */ ++ "recvmmsg", /* 243 */ ++ "arch_specific_syscall", /* 244 */ ++ "245", /* 245 */ ++ "246", /* 246 */ ++ "247", /* 247 */ ++ "248", /* 248 */ ++ "249", /* 249 */ ++ "250", /* 250 */ ++ "251", /* 251 */ ++ "252", /* 252 */ ++ "253", /* 253 */ ++ "254", /* 254 */ ++ "255", /* 255 */ ++ "256", /* 256 */ ++ "257", /* 257 */ ++ "258", /* 258 */ ++ "259", /* 259 */ ++ "wait4", /* 260 */ ++ "prlimit64", /* 261 */ ++ "fanotify_init", /* 262 */ ++ "fanotify_mark", /* 263 */ ++ "name_to_handle_at", /* 264 */ ++ "open_by_handle_at", /* 265 */ ++ "clock_adjtime", /* 266 */ ++ "syncfs", /* 267 */ ++ "setns", /* 268 */ ++ "sendmmsg", /* 269 */ ++ "process_vm_readv", /* 270 */ ++ "process_vm_writev", /* 271 */ ++ "kcmp", /* 272 */ ++ "finit_module", /* 273 */ ++ "syscalls", /* 274 */ ++ "275", /* 275 */ ++ "276", /* 276 */ ++ "277", /* 277 */ ++ "278", /* 278 */ ++ "279", /* 279 */ ++ "280", /* 280 */ ++ "281", /* 281 */ ++ "282", /* 282 */ ++ "283", /* 283 */ ++ "284", /* 284 */ ++ "285", /* 285 */ ++ "286", /* 286 */ ++ "287", /* 287 */ ++ "288", /* 288 */ ++ "289", /* 289 */ ++ "290", /* 290 */ ++ "291", /* 291 */ ++ "292", /* 292 */ ++ "293", /* 293 */ ++ "294", /* 294 */ ++ "295", /* 295 */ ++ "296", /* 296 */ ++ "297", /* 297 */ ++ "298", /* 298 */ ++ "299", /* 299 */ ++ "300", /* 300 */ ++ "301", /* 301 */ ++ "302", /* 302 */ ++ "303", /* 303 */ ++ "304", /* 304 */ ++ "305", /* 305 */ ++ "306", /* 306 */ ++ "307", /* 307 */ ++ "308", /* 308 */ ++ "309", /* 309 */ ++ "310", /* 310 */ ++ "311", /* 311 */ ++ "312", /* 312 */ ++ "313", /* 313 */ ++ "314", /* 314 */ ++ "315", /* 315 */ ++ "316", /* 316 */ ++ "317", /* 317 */ ++ "318", /* 318 */ ++ "319", /* 319 */ ++ "320", /* 320 */ ++ "321", /* 321 */ ++ "322", /* 322 */ ++ "323", /* 323 */ ++ "324", /* 324 */ ++ "325", /* 325 */ ++ "326", /* 326 */ ++ "327", /* 327 */ ++ "328", /* 328 */ ++ "329", /* 329 */ ++ "330", /* 330 */ ++ "331", /* 331 */ ++ "332", /* 332 */ ++ "333", /* 333 */ ++ "334", /* 334 */ ++ "335", /* 335 */ ++ "336", /* 336 */ ++ "337", /* 337 */ ++ "338", /* 338 */ ++ "339", /* 339 */ ++ "340", /* 340 */ ++ "341", /* 341 */ ++ "342", /* 342 */ ++ "343", /* 343 */ ++ "344", /* 344 */ ++ "345", /* 345 */ ++ "346", /* 346 */ ++ "347", /* 347 */ ++ "348", /* 348 */ ++ "349", /* 349 */ ++ "350", /* 350 */ ++ "351", /* 351 */ ++ "352", /* 352 */ ++ "353", /* 353 */ ++ "354", /* 354 */ ++ "355", /* 355 */ ++ "356", /* 356 */ ++ "357", /* 357 */ ++ "358", /* 358 */ ++ "359", /* 359 */ ++ "360", /* 360 */ ++ "361", /* 361 */ ++ "362", /* 362 */ ++ "363", /* 363 */ ++ "364", /* 364 */ ++ "365", /* 365 */ ++ "366", /* 366 */ ++ "367", /* 367 */ ++ "368", /* 368 */ ++ "369", /* 369 */ ++ "370", /* 370 */ ++ "371", /* 371 */ ++ "372", /* 372 */ ++ "373", /* 373 */ ++ "374", /* 374 */ ++ "375", /* 375 */ ++ "376", /* 376 */ ++ "377", /* 377 */ ++ "378", /* 378 */ ++ "379", /* 379 */ ++ "380", /* 380 */ ++ "381", /* 381 */ ++ "382", /* 382 */ ++ "383", /* 383 */ ++ "384", /* 384 */ ++ "385", /* 385 */ ++ "386", /* 386 */ ++ "387", /* 387 */ ++ "388", /* 388 */ ++ "389", /* 389 */ ++ "390", /* 390 */ ++ "391", /* 391 */ ++ "392", /* 392 */ ++ "393", /* 393 */ ++ "394", /* 394 */ ++ "395", /* 395 */ ++ "396", /* 396 */ ++ "397", /* 397 */ ++ "398", /* 398 */ ++ "399", /* 399 */ ++ "400", /* 400 */ ++ "401", /* 401 */ ++ "402", /* 402 */ ++ "403", /* 403 */ ++ "404", /* 404 */ ++ "405", /* 405 */ ++ "406", /* 406 */ ++ "407", /* 407 */ ++ "408", /* 408 */ ++ "409", /* 409 */ ++ "410", /* 410 */ ++ "411", /* 411 */ ++ "412", /* 412 */ ++ "413", /* 413 */ ++ "414", /* 414 */ ++ "415", /* 415 */ ++ "416", /* 416 */ ++ "417", /* 417 */ ++ "418", /* 418 */ ++ "419", /* 419 */ ++ "420", /* 420 */ ++ "421", /* 421 */ ++ "422", /* 422 */ ++ "423", /* 423 */ ++ "424", /* 424 */ ++ "425", /* 425 */ ++ "426", /* 426 */ ++ "427", /* 427 */ ++ "428", /* 428 */ ++ "429", /* 429 */ ++ "430", /* 430 */ ++ "431", /* 431 */ ++ "432", /* 432 */ ++ "433", /* 433 */ ++ "434", /* 434 */ ++ "435", /* 435 */ ++ "436", /* 436 */ ++ "437", /* 437 */ ++ "438", /* 438 */ ++ "439", /* 439 */ ++ "440", /* 440 */ ++ "441", /* 441 */ ++ "442", /* 442 */ ++ "443", /* 443 */ ++ "444", /* 444 */ ++ "445", /* 445 */ ++ "446", /* 446 */ ++ "447", /* 447 */ ++ "448", /* 448 */ ++ "449", /* 449 */ ++ "450", /* 450 */ ++ "451", /* 451 */ ++ "452", /* 452 */ ++ "453", /* 453 */ ++ "454", /* 454 */ ++ "455", /* 455 */ ++ "456", /* 456 */ ++ "457", /* 457 */ ++ "458", /* 458 */ ++ "459", /* 459 */ ++ "460", /* 460 */ ++ "461", /* 461 */ ++ "462", /* 462 */ ++ "463", /* 463 */ ++ "464", /* 464 */ ++ "465", /* 465 */ ++ "466", /* 466 */ ++ "467", /* 467 */ ++ "468", /* 468 */ ++ "469", /* 469 */ ++ "470", /* 470 */ ++ "471", /* 471 */ ++ "472", /* 472 */ ++ "473", /* 473 */ ++ "474", /* 474 */ ++ "475", /* 475 */ ++ "476", /* 476 */ ++ "477", /* 477 */ ++ "478", /* 478 */ ++ "479", /* 479 */ ++ "480", /* 480 */ ++ "481", /* 481 */ ++ "482", /* 482 */ ++ "483", /* 483 */ ++ "484", /* 484 */ ++ "485", /* 485 */ ++ "486", /* 486 */ ++ "487", /* 487 */ ++ "488", /* 488 */ ++ "489", /* 489 */ ++ "490", /* 490 */ ++ "491", /* 491 */ ++ "492", /* 492 */ ++ "493", /* 493 */ ++ "494", /* 494 */ ++ "495", /* 495 */ ++ "496", /* 496 */ ++ "497", /* 497 */ ++ "498", /* 498 */ ++ "499", /* 499 */ ++ "500", /* 500 */ ++ "501", /* 501 */ ++ "502", /* 502 */ ++ "503", /* 503 */ ++ "504", /* 504 */ ++ "505", /* 505 */ ++ "506", /* 506 */ ++ "507", /* 507 */ ++ "508", /* 508 */ ++ "509", /* 509 */ ++ "510", /* 510 */ ++ "511", /* 511 */ ++ "512", /* 512 */ ++ "513", /* 513 */ ++ "514", /* 514 */ ++ "515", /* 515 */ ++ "516", /* 516 */ ++ "517", /* 517 */ ++ "518", /* 518 */ ++ "519", /* 519 */ ++ "520", /* 520 */ ++ "521", /* 521 */ ++ "522", /* 522 */ ++ "523", /* 523 */ ++ "524", /* 524 */ ++ "525", /* 525 */ ++ "526", /* 526 */ ++ "527", /* 527 */ ++ "528", /* 528 */ ++ "529", /* 529 */ ++ "530", /* 530 */ ++ "531", /* 531 */ ++ "532", /* 532 */ ++ "533", /* 533 */ ++ "534", /* 534 */ ++ "535", /* 535 */ ++ "536", /* 536 */ ++ "537", /* 537 */ ++ "538", /* 538 */ ++ "539", /* 539 */ ++ "540", /* 540 */ ++ "541", /* 541 */ ++ "542", /* 542 */ ++ "543", /* 543 */ ++ "544", /* 544 */ ++ "545", /* 545 */ ++ "546", /* 546 */ ++ "547", /* 547 */ ++ "548", /* 548 */ ++ "549", /* 549 */ ++ "550", /* 550 */ ++ "551", /* 551 */ ++ "552", /* 552 */ ++ "553", /* 553 */ ++ "554", /* 554 */ ++ "555", /* 555 */ ++ "556", /* 556 */ ++ "557", /* 557 */ ++ "558", /* 558 */ ++ "559", /* 559 */ ++ "560", /* 560 */ ++ "561", /* 561 */ ++ "562", /* 562 */ ++ "563", /* 563 */ ++ "564", /* 564 */ ++ "565", /* 565 */ ++ "566", /* 566 */ ++ "567", /* 567 */ ++ "568", /* 568 */ ++ "569", /* 569 */ ++ "570", /* 570 */ ++ "571", /* 571 */ ++ "572", /* 572 */ ++ "573", /* 573 */ ++ "574", /* 574 */ ++ "575", /* 575 */ ++ "576", /* 576 */ ++ "577", /* 577 */ ++ "578", /* 578 */ ++ "579", /* 579 */ ++ "580", /* 580 */ ++ "581", /* 581 */ ++ "582", /* 582 */ ++ "583", /* 583 */ ++ "584", /* 584 */ ++ "585", /* 585 */ ++ "586", /* 586 */ ++ "587", /* 587 */ ++ "588", /* 588 */ ++ "589", /* 589 */ ++ "590", /* 590 */ ++ "591", /* 591 */ ++ "592", /* 592 */ ++ "593", /* 593 */ ++ "594", /* 594 */ ++ "595", /* 595 */ ++ "596", /* 596 */ ++ "597", /* 597 */ ++ "598", /* 598 */ ++ "599", /* 599 */ ++ "600", /* 600 */ ++ "601", /* 601 */ ++ "602", /* 602 */ ++ "603", /* 603 */ ++ "604", /* 604 */ ++ "605", /* 605 */ ++ "606", /* 606 */ ++ "607", /* 607 */ ++ "608", /* 608 */ ++ "609", /* 609 */ ++ "610", /* 610 */ ++ "611", /* 611 */ ++ "612", /* 612 */ ++ "613", /* 613 */ ++ "614", /* 614 */ ++ "615", /* 615 */ ++ "616", /* 616 */ ++ "617", /* 617 */ ++ "618", /* 618 */ ++ "619", /* 619 */ ++ "620", /* 620 */ ++ "621", /* 621 */ ++ "622", /* 622 */ ++ "623", /* 623 */ ++ "624", /* 624 */ ++ "625", /* 625 */ ++ "626", /* 626 */ ++ "627", /* 627 */ ++ "628", /* 628 */ ++ "629", /* 629 */ ++ "630", /* 630 */ ++ "631", /* 631 */ ++ "632", /* 632 */ ++ "633", /* 633 */ ++ "634", /* 634 */ ++ "635", /* 635 */ ++ "636", /* 636 */ ++ "637", /* 637 */ ++ "638", /* 638 */ ++ "639", /* 639 */ ++ "640", /* 640 */ ++ "641", /* 641 */ ++ "642", /* 642 */ ++ "643", /* 643 */ ++ "644", /* 644 */ ++ "645", /* 645 */ ++ "646", /* 646 */ ++ "647", /* 647 */ ++ "648", /* 648 */ ++ "649", /* 649 */ ++ "650", /* 650 */ ++ "651", /* 651 */ ++ "652", /* 652 */ ++ "653", /* 653 */ ++ "654", /* 654 */ ++ "655", /* 655 */ ++ "656", /* 656 */ ++ "657", /* 657 */ ++ "658", /* 658 */ ++ "659", /* 659 */ ++ "660", /* 660 */ ++ "661", /* 661 */ ++ "662", /* 662 */ ++ "663", /* 663 */ ++ "664", /* 664 */ ++ "665", /* 665 */ ++ "666", /* 666 */ ++ "667", /* 667 */ ++ "668", /* 668 */ ++ "669", /* 669 */ ++ "670", /* 670 */ ++ "671", /* 671 */ ++ "672", /* 672 */ ++ "673", /* 673 */ ++ "674", /* 674 */ ++ "675", /* 675 */ ++ "676", /* 676 */ ++ "677", /* 677 */ ++ "678", /* 678 */ ++ "679", /* 679 */ ++ "680", /* 680 */ ++ "681", /* 681 */ ++ "682", /* 682 */ ++ "683", /* 683 */ ++ "684", /* 684 */ ++ "685", /* 685 */ ++ "686", /* 686 */ ++ "687", /* 687 */ ++ "688", /* 688 */ ++ "689", /* 689 */ ++ "690", /* 690 */ ++ "691", /* 691 */ ++ "692", /* 692 */ ++ "693", /* 693 */ ++ "694", /* 694 */ ++ "695", /* 695 */ ++ "696", /* 696 */ ++ "697", /* 697 */ ++ "698", /* 698 */ ++ "699", /* 699 */ ++ "700", /* 700 */ ++ "701", /* 701 */ ++ "702", /* 702 */ ++ "703", /* 703 */ ++ "704", /* 704 */ ++ "705", /* 705 */ ++ "706", /* 706 */ ++ "707", /* 707 */ ++ "708", /* 708 */ ++ "709", /* 709 */ ++ "710", /* 710 */ ++ "711", /* 711 */ ++ "712", /* 712 */ ++ "713", /* 713 */ ++ "714", /* 714 */ ++ "715", /* 715 */ ++ "716", /* 716 */ ++ "717", /* 717 */ ++ "718", /* 718 */ ++ "719", /* 719 */ ++ "720", /* 720 */ ++ "721", /* 721 */ ++ "722", /* 722 */ ++ "723", /* 723 */ ++ "724", /* 724 */ ++ "725", /* 725 */ ++ "726", /* 726 */ ++ "727", /* 727 */ ++ "728", /* 728 */ ++ "729", /* 729 */ ++ "730", /* 730 */ ++ "731", /* 731 */ ++ "732", /* 732 */ ++ "733", /* 733 */ ++ "734", /* 734 */ ++ "735", /* 735 */ ++ "736", /* 736 */ ++ "737", /* 737 */ ++ "738", /* 738 */ ++ "739", /* 739 */ ++ "740", /* 740 */ ++ "741", /* 741 */ ++ "742", /* 742 */ ++ "743", /* 743 */ ++ "744", /* 744 */ ++ "745", /* 745 */ ++ "746", /* 746 */ ++ "747", /* 747 */ ++ "748", /* 748 */ ++ "749", /* 749 */ ++ "750", /* 750 */ ++ "751", /* 751 */ ++ "752", /* 752 */ ++ "753", /* 753 */ ++ "754", /* 754 */ ++ "755", /* 755 */ ++ "756", /* 756 */ ++ "757", /* 757 */ ++ "758", /* 758 */ ++ "759", /* 759 */ ++ "760", /* 760 */ ++ "761", /* 761 */ ++ "762", /* 762 */ ++ "763", /* 763 */ ++ "764", /* 764 */ ++ "765", /* 765 */ ++ "766", /* 766 */ ++ "767", /* 767 */ ++ "768", /* 768 */ ++ "769", /* 769 */ ++ "770", /* 770 */ ++ "771", /* 771 */ ++ "772", /* 772 */ ++ "773", /* 773 */ ++ "774", /* 774 */ ++ "775", /* 775 */ ++ "776", /* 776 */ ++ "777", /* 777 */ ++ "778", /* 778 */ ++ "779", /* 779 */ ++ "780", /* 780 */ ++ "781", /* 781 */ ++ "782", /* 782 */ ++ "783", /* 783 */ ++ "784", /* 784 */ ++ "785", /* 785 */ ++ "786", /* 786 */ ++ "787", /* 787 */ ++ "788", /* 788 */ ++ "789", /* 789 */ ++ "790", /* 790 */ ++ "791", /* 791 */ ++ "792", /* 792 */ ++ "793", /* 793 */ ++ "794", /* 794 */ ++ "795", /* 795 */ ++ "796", /* 796 */ ++ "797", /* 797 */ ++ "798", /* 798 */ ++ "799", /* 799 */ ++ "800", /* 800 */ ++ "801", /* 801 */ ++ "802", /* 802 */ ++ "803", /* 803 */ ++ "804", /* 804 */ ++ "805", /* 805 */ ++ "806", /* 806 */ ++ "807", /* 807 */ ++ "808", /* 808 */ ++ "809", /* 809 */ ++ "810", /* 810 */ ++ "811", /* 811 */ ++ "812", /* 812 */ ++ "813", /* 813 */ ++ "814", /* 814 */ ++ "815", /* 815 */ ++ "816", /* 816 */ ++ "817", /* 817 */ ++ "818", /* 818 */ ++ "819", /* 819 */ ++ "820", /* 820 */ ++ "821", /* 821 */ ++ "822", /* 822 */ ++ "823", /* 823 */ ++ "824", /* 824 */ ++ "825", /* 825 */ ++ "826", /* 826 */ ++ "827", /* 827 */ ++ "828", /* 828 */ ++ "829", /* 829 */ ++ "830", /* 830 */ ++ "831", /* 831 */ ++ "832", /* 832 */ ++ "833", /* 833 */ ++ "834", /* 834 */ ++ "835", /* 835 */ ++ "836", /* 836 */ ++ "837", /* 837 */ ++ "838", /* 838 */ ++ "839", /* 839 */ ++ "840", /* 840 */ ++ "841", /* 841 */ ++ "842", /* 842 */ ++ "843", /* 843 */ ++ "844", /* 844 */ ++ "845", /* 845 */ ++ "846", /* 846 */ ++ "847", /* 847 */ ++ "848", /* 848 */ ++ "849", /* 849 */ ++ "850", /* 850 */ ++ "851", /* 851 */ ++ "852", /* 852 */ ++ "853", /* 853 */ ++ "854", /* 854 */ ++ "855", /* 855 */ ++ "856", /* 856 */ ++ "857", /* 857 */ ++ "858", /* 858 */ ++ "859", /* 859 */ ++ "860", /* 860 */ ++ "861", /* 861 */ ++ "862", /* 862 */ ++ "863", /* 863 */ ++ "864", /* 864 */ ++ "865", /* 865 */ ++ "866", /* 866 */ ++ "867", /* 867 */ ++ "868", /* 868 */ ++ "869", /* 869 */ ++ "870", /* 870 */ ++ "871", /* 871 */ ++ "872", /* 872 */ ++ "873", /* 873 */ ++ "874", /* 874 */ ++ "875", /* 875 */ ++ "876", /* 876 */ ++ "877", /* 877 */ ++ "878", /* 878 */ ++ "879", /* 879 */ ++ "880", /* 880 */ ++ "881", /* 881 */ ++ "882", /* 882 */ ++ "883", /* 883 */ ++ "884", /* 884 */ ++ "885", /* 885 */ ++ "886", /* 886 */ ++ "887", /* 887 */ ++ "888", /* 888 */ ++ "889", /* 889 */ ++ "890", /* 890 */ ++ "891", /* 891 */ ++ "892", /* 892 */ ++ "893", /* 893 */ ++ "894", /* 894 */ ++ "895", /* 895 */ ++ "896", /* 896 */ ++ "897", /* 897 */ ++ "898", /* 898 */ ++ "899", /* 899 */ ++ "900", /* 900 */ ++ "901", /* 901 */ ++ "902", /* 902 */ ++ "903", /* 903 */ ++ "904", /* 904 */ ++ "905", /* 905 */ ++ "906", /* 906 */ ++ "907", /* 907 */ ++ "908", /* 908 */ ++ "909", /* 909 */ ++ "910", /* 910 */ ++ "911", /* 911 */ ++ "912", /* 912 */ ++ "913", /* 913 */ ++ "914", /* 914 */ ++ "915", /* 915 */ ++ "916", /* 916 */ ++ "917", /* 917 */ ++ "918", /* 918 */ ++ "919", /* 919 */ ++ "920", /* 920 */ ++ "921", /* 921 */ ++ "922", /* 922 */ ++ "923", /* 923 */ ++ "924", /* 924 */ ++ "925", /* 925 */ ++ "926", /* 926 */ ++ "927", /* 927 */ ++ "928", /* 928 */ ++ "929", /* 929 */ ++ "930", /* 930 */ ++ "931", /* 931 */ ++ "932", /* 932 */ ++ "933", /* 933 */ ++ "934", /* 934 */ ++ "935", /* 935 */ ++ "936", /* 936 */ ++ "937", /* 937 */ ++ "938", /* 938 */ ++ "939", /* 939 */ ++ "940", /* 940 */ ++ "941", /* 941 */ ++ "942", /* 942 */ ++ "943", /* 943 */ ++ "944", /* 944 */ ++ "945", /* 945 */ ++ "946", /* 946 */ ++ "947", /* 947 */ ++ "948", /* 948 */ ++ "949", /* 949 */ ++ "950", /* 950 */ ++ "951", /* 951 */ ++ "952", /* 952 */ ++ "953", /* 953 */ ++ "954", /* 954 */ ++ "955", /* 955 */ ++ "956", /* 956 */ ++ "957", /* 957 */ ++ "958", /* 958 */ ++ "959", /* 959 */ ++ "960", /* 960 */ ++ "961", /* 961 */ ++ "962", /* 962 */ ++ "963", /* 963 */ ++ "964", /* 964 */ ++ "965", /* 965 */ ++ "966", /* 966 */ ++ "967", /* 967 */ ++ "968", /* 968 */ ++ "969", /* 969 */ ++ "970", /* 970 */ ++ "971", /* 971 */ ++ "972", /* 972 */ ++ "973", /* 973 */ ++ "974", /* 974 */ ++ "975", /* 975 */ ++ "976", /* 976 */ ++ "977", /* 977 */ ++ "978", /* 978 */ ++ "979", /* 979 */ ++ "980", /* 980 */ ++ "981", /* 981 */ ++ "982", /* 982 */ ++ "983", /* 983 */ ++ "984", /* 984 */ ++ "985", /* 985 */ ++ "986", /* 986 */ ++ "987", /* 987 */ ++ "988", /* 988 */ ++ "989", /* 989 */ ++ "990", /* 990 */ ++ "991", /* 991 */ ++ "992", /* 992 */ ++ "993", /* 993 */ ++ "994", /* 994 */ ++ "995", /* 995 */ ++ "996", /* 996 */ ++ "997", /* 997 */ ++ "998", /* 998 */ ++ "999", /* 999 */ ++ "1000", /* 1000 */ ++ "1001", /* 1001 */ ++ "1002", /* 1002 */ ++ "1003", /* 1003 */ ++ "1004", /* 1004 */ ++ "1005", /* 1005 */ ++ "1006", /* 1006 */ ++ "1007", /* 1007 */ ++ "1008", /* 1008 */ ++ "1009", /* 1009 */ ++ "1010", /* 1010 */ ++ "1011", /* 1011 */ ++ "1012", /* 1012 */ ++ "1013", /* 1013 */ ++ "1014", /* 1014 */ ++ "1015", /* 1015 */ ++ "1016", /* 1016 */ ++ "1017", /* 1017 */ ++ "1018", /* 1018 */ ++ "1019", /* 1019 */ ++ "1020", /* 1020 */ ++ "1021", /* 1021 */ ++ "1022", /* 1022 */ ++ "1023", /* 1023 */ ++ "open", /* 1024 */ ++ "link", /* 1025 */ ++ "unlink", /* 1026 */ ++ "mknod", /* 1027 */ ++ "chmod", /* 1028 */ ++ "chown", /* 1029 */ ++ "mkdir", /* 1030 */ ++ "rmdir", /* 1031 */ ++ "lchown", /* 1032 */ ++ "access", /* 1033 */ ++ "rename", /* 1034 */ ++ "readlink", /* 1035 */ ++ "symlink", /* 1036 */ ++ "utimes", /* 1037 */ ++ "stat", /* 1038 */ ++ "lstat", /* 1039 */ ++ "pipe", /* 1040 */ ++ "dup2", /* 1041 */ ++ "epoll_create", /* 1042 */ ++ "inotify_init", /* 1043 */ ++ "eventfd", /* 1044 */ ++ "signalfd", /* 1045 */ ++ "sendfile", /* 1046 */ ++ "ftruncate", /* 1047 */ ++ "truncate", /* 1048 */ ++ "stat", /* 1049 */ ++ "lstat", /* 1050 */ ++ "fstat", /* 1051 */ ++ "fcntl", /* 1052 */ ++ "fadvise64", /* 1053 */ ++ "newfstatat", /* 1054 */ ++ "fstatfs", /* 1055 */ ++ "statfs", /* 1056 */ ++ "lseek", /* 1057 */ ++ "mmap", /* 1058 */ ++ "alarm", /* 1059 */ ++ "getpgrp", /* 1060 */ ++ "pause", /* 1061 */ ++ "time", /* 1062 */ ++ "utime", /* 1063 */ ++ "creat", /* 1064 */ ++ "getdents", /* 1065 */ ++ "futimesat", /* 1066 */ ++ "select", /* 1067 */ ++ "poll", /* 1068 */ ++ "epoll_wait", /* 1069 */ ++ "ustat", /* 1070 */ ++ "vfork", /* 1071 */ ++ "oldwait4", /* 1072 */ ++ "recv", /* 1073 */ ++ "send", /* 1074 */ ++ "bdflush", /* 1075 */ ++ "umount", /* 1076 */ ++ "uselib", /* 1077 */ ++ "_sysctl", /* 1078 */ ++ "fork", /* 1079 */ +Index: ltrace/sysdeps/linux-gnu/aarch64/trace.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ ltrace/sysdeps/linux-gnu/aarch64/trace.c 2014-03-12 16:23:25.382866486 -0600 +@@ -0,0 +1,83 @@ ++/* ++ * This file is part of ltrace. ++ * Copyright (C) 2014 Petr Machata, Red Hat, Inc. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++ * 02110-1301 USA ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "backend.h" ++#include "proc.h" ++ ++void ++get_arch_dep(struct Process *proc) ++{ ++} ++ ++int aarch64_read_gregs(struct Process *proc, struct user_pt_regs *regs); ++ ++/* The syscall instruction is: ++ * | 31 21 | 20 5 | 4 0 | ++ * | 1 1 0 1 0 1 0 0 | 0 0 0 | imm16 | 0 0 0 0 1 | */ ++#define SVC_MASK 0xffe0001f ++#define SVC_VALUE 0xd4000001 ++ ++int ++syscall_p(struct Process *proc, int status, int *sysnum) ++{ ++ if (WIFSTOPPED(status) ++ && WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) { ++ ++ struct user_pt_regs regs; ++ if (aarch64_read_gregs(proc, ®s) < 0) { ++ fprintf(stderr, "syscall_p: " ++ "Couldn't read registers of %d.\n", proc->pid); ++ return -1; ++ } ++ ++ errno = 0; ++ unsigned long insn = (unsigned long) ptrace(PTRACE_PEEKTEXT, ++ proc->pid, ++ regs.pc - 4, 0); ++ if (insn == -1UL && errno != 0) { ++ fprintf(stderr, "syscall_p: " ++ "Couldn't peek into %d: %s\n", proc->pid, ++ strerror(errno)); ++ return -1; ++ } ++ ++ insn &= 0xffffffffUL; ++ if ((insn & SVC_MASK) == SVC_VALUE) { ++ *sysnum = regs.regs[8]; ++ ++ size_t d1 = proc->callstack_depth - 1; ++ if (proc->callstack_depth > 0 ++ && proc->callstack[d1].is_syscall ++ && proc->callstack[d1].c_un.syscall == *sysnum) ++ return 2; ++ ++ return 1; ++ } ++ } ++ ++ return 0; ++} diff -Nru ltrace-0.7.3/debian/patches/Move-get_hfa_type-from-IA64-backend-to-type.c-name-i.patch ltrace-0.7.3/debian/patches/Move-get_hfa_type-from-IA64-backend-to-type.c-name-i.patch --- ltrace-0.7.3/debian/patches/Move-get_hfa_type-from-IA64-backend-to-type.c-name-i.patch 1970-01-01 00:00:00.000000000 +0000 +++ ltrace-0.7.3/debian/patches/Move-get_hfa_type-from-IA64-backend-to-type.c-name-i.patch 2014-03-20 14:49:16.000000000 +0000 @@ -0,0 +1,163 @@ +Author: Petr Machata +Description: Move get_hfa_type from IA64 backend to type.c, name it type_get_hfa_type +Applied-Upstream: http://anonscm.debian.org/gitweb/?p=collab-maint/ltrace.git;a=commit;h=982cbca34b2b49a158086ff5f43eb9bba89edead +Last-Update: 2014-03-13 + +Index: ltrace/sysdeps/linux-gnu/ia64/fetch.c +=================================================================== +--- ltrace.orig/sysdeps/linux-gnu/ia64/fetch.c 2014-03-12 16:13:44.075726000 -0600 ++++ ltrace/sysdeps/linux-gnu/ia64/fetch.c 2014-03-13 09:32:30.504762084 -0600 +@@ -1,6 +1,6 @@ + /* + * This file is part of ltrace. +- * Copyright (C) 2012 Petr Machata, Red Hat Inc. ++ * Copyright (C) 2012,2013 Petr Machata, Red Hat Inc. + * Copyright (C) 2008,2009 Juan Cespedes + * Copyright (C) 2006 Steve Fink + * Copyright (C) 2006 Ian Wienand +@@ -249,37 +249,6 @@ + return 0; + } + +-static enum arg_type +-get_hfa_type(struct arg_type_info *info, size_t *countp) +-{ +- size_t n = type_aggregate_size(info); +- if (n == (size_t)-1) +- return ARGTYPE_VOID; +- +- enum arg_type type = ARGTYPE_VOID; +- *countp = 0; +- +- while (n-- > 0) { +- struct arg_type_info *emt = type_element(info, n); +- +- enum arg_type emt_type = emt->type; +- size_t emt_count = 1; +- if (emt_type == ARGTYPE_STRUCT || emt_type == ARGTYPE_ARRAY) +- emt_type = get_hfa_type(emt, &emt_count); +- +- if (type == ARGTYPE_VOID) { +- if (emt_type != ARGTYPE_FLOAT +- && emt_type != ARGTYPE_DOUBLE) +- return ARGTYPE_VOID; +- type = emt_type; +- } +- if (emt_type != type) +- return ARGTYPE_VOID; +- *countp += emt_count; +- } +- return type; +-} +- + static int + allocate_hfa(struct fetch_context *ctx, struct Process *proc, + struct arg_type_info *info, struct value *valuep, +@@ -380,10 +349,11 @@ + * floating-point registers, beginning with f8. */ + if (info->type == ARGTYPE_STRUCT || info->type == ARGTYPE_ARRAY) { + size_t hfa_size; +- enum arg_type hfa_type = get_hfa_type(info, &hfa_size); +- if (hfa_type != ARGTYPE_VOID && hfa_size <= 8) ++ struct arg_type_info *hfa_info ++ = type_get_hfa_type(info, &hfa_size); ++ if (hfa_info != NULL && hfa_size <= 8) + return allocate_hfa(ctx, proc, info, valuep, +- hfa_type, hfa_size); ++ hfa_info->type, hfa_size); + } + + /* Integers and pointers are passed in r8. 128-bit integers +@@ -409,7 +379,7 @@ + struct arg_type_info *info, struct value *valuep) + { + switch (info->type) { +- enum arg_type hfa_type; ++ struct arg_type_info *hfa_info; + size_t hfa_size; + + case ARGTYPE_VOID: +@@ -421,10 +391,10 @@ + return allocate_float(ctx, proc, info, valuep, 1); + + case ARGTYPE_STRUCT: +- hfa_type = get_hfa_type(info, &hfa_size); +- if (hfa_type != ARGTYPE_VOID) ++ hfa_info = type_get_hfa_type(info, &hfa_size); ++ if (hfa_info != NULL) + return allocate_hfa(ctx, proc, info, valuep, +- hfa_type, hfa_size); ++ hfa_info->type, hfa_size); + /* Fall through. */ + case ARGTYPE_CHAR: + case ARGTYPE_SHORT: +Index: ltrace/type.c +=================================================================== +--- ltrace.orig/type.c 2014-03-12 16:13:44.075726000 -0600 ++++ ltrace/type.c 2014-03-13 09:32:30.504762084 -0600 +@@ -568,3 +568,39 @@ + } + abort(); + } ++ ++struct arg_type_info * ++type_get_hfa_type(struct arg_type_info *info, size_t *countp) ++{ ++ assert(info != NULL); ++ if (info->type != ARGTYPE_STRUCT ++ && info->type != ARGTYPE_ARRAY) ++ return NULL; ++ ++ size_t n = type_aggregate_size(info); ++ if (n == (size_t)-1) ++ return NULL; ++ ++ struct arg_type_info *ret = NULL; ++ *countp = 0; ++ ++ while (n-- > 0) { ++ struct arg_type_info *emt = type_element(info, n); ++ ++ size_t emt_count = 1; ++ if (emt->type == ARGTYPE_STRUCT || emt->type == ARGTYPE_ARRAY) ++ emt = type_get_hfa_type(emt, &emt_count); ++ if (emt == NULL) ++ return NULL; ++ if (ret == NULL) { ++ if (emt->type != ARGTYPE_FLOAT ++ && emt->type != ARGTYPE_DOUBLE) ++ return NULL; ++ ret = emt; ++ } ++ if (emt->type != ret->type) ++ return NULL; ++ *countp += emt_count; ++ } ++ return ret; ++} +Index: ltrace/type.h +=================================================================== +--- ltrace.orig/type.h 2014-03-12 16:13:44.075726000 -0600 ++++ ltrace/type.h 2014-03-13 09:32:30.504762084 -0600 +@@ -1,6 +1,6 @@ + /* + * This file is part of ltrace. +- * Copyright (C) 2011,2012 Petr Machata, Red Hat Inc. ++ * Copyright (C) 2011,2012,2013 Petr Machata, Red Hat Inc. + * Copyright (C) 1997-2009 Juan Cespedes + * + * This program is free software; you can redistribute it and/or +@@ -142,4 +142,13 @@ + * type. */ + struct arg_type_info *type_get_fp_equivalent(struct arg_type_info *info); + ++/* If INFO is homogeneous floating-point aggregate, return the ++ * corresponding floating point type, and set *COUNTP to number of ++ * fields of the structure. Otherwise return NULL. INFO is a HFA if ++ * it's an aggregate whose each field is either a HFA, or a ++ * floating-point type. */ ++struct arg_type_info *type_get_hfa_type(struct arg_type_info *info, ++ size_t *countp); ++ ++ + #endif /* TYPE_H */ diff -Nru ltrace-0.7.3/debian/patches/Set-child-stack-alignment-in-trace-clone.c.patch ltrace-0.7.3/debian/patches/Set-child-stack-alignment-in-trace-clone.c.patch --- ltrace-0.7.3/debian/patches/Set-child-stack-alignment-in-trace-clone.c.patch 1970-01-01 00:00:00.000000000 +0000 +++ ltrace-0.7.3/debian/patches/Set-child-stack-alignment-in-trace-clone.c.patch 2014-03-20 14:49:16.000000000 +0000 @@ -0,0 +1,31 @@ +Author: Petr Machata +Description: Set child stack alignment in trace-clone.c + This is important on aarch64, which requires 16-byte aligned + stack pointer. This might be relevant on other arches as well, + I suspect we just happened to get the 16-byte boundary in some + cases. +Applied-Upstream: http://anonscm.debian.org/gitweb/?p=collab-maint/ltrace.git;a=commit;h=0b5457a9e59978bcd2eb5240f54838910365a93c +Last-Update: 2014-03-13 + +Index: ltrace/testsuite/ltrace.minor/trace-clone.c +=================================================================== +--- ltrace.orig/testsuite/ltrace.minor/trace-clone.c 2014-03-12 16:13:44.075726000 -0600 ++++ ltrace/testsuite/ltrace.minor/trace-clone.c 2014-03-12 16:16:14.593150571 -0600 +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + + int child () + { +@@ -22,7 +23,8 @@ + int main () + { + pid_t pid; +- static char stack[STACK_SIZE]; ++ static __attribute__ ((aligned (16))) char stack[STACK_SIZE]; ++ + #ifdef __ia64__ + pid = __clone2((myfunc)&child, stack, STACK_SIZE, CLONE_FS, NULL); + #else diff -Nru ltrace-0.7.3/debian/patches/add-missing-stdint.h-include.patch ltrace-0.7.3/debian/patches/add-missing-stdint.h-include.patch --- ltrace-0.7.3/debian/patches/add-missing-stdint.h-include.patch 1970-01-01 00:00:00.000000000 +0000 +++ ltrace-0.7.3/debian/patches/add-missing-stdint.h-include.patch 2014-03-20 14:49:16.000000000 +0000 @@ -0,0 +1,20 @@ +Author: dann frazier +Description: add missing include + aarch64's fetch.c uses the uintptr_t typedef defined by stdint.h without + including it. This doesn't currently cause a build failure because stdint.h + is indirectly included via proc.h. +Applied-Upstream: http://anonscm.debian.org/gitweb/?p=collab-maint/ltrace.git;a=commitdiff;h=e9919d980a5b6fc2417d7c05d46329b442467940 +Last-Update: 2014-03-17 + +Index: ltrace/sysdeps/linux-gnu/aarch64/fetch.c +=================================================================== +--- ltrace.orig/sysdeps/linux-gnu/aarch64/fetch.c 2014-03-12 16:23:25.382866486 -0600 ++++ ltrace/sysdeps/linux-gnu/aarch64/fetch.c 2014-03-12 16:25:38.492638417 -0600 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + #include "fetch.h" + #include "proc.h" diff -Nru ltrace-0.7.3/debian/patches/ppc64el.diff ltrace-0.7.3/debian/patches/ppc64el.diff --- ltrace-0.7.3/debian/patches/ppc64el.diff 1970-01-01 00:00:00.000000000 +0000 +++ ltrace-0.7.3/debian/patches/ppc64el.diff 2014-02-24 15:37:47.000000000 +0000 @@ -0,0 +1,575 @@ +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -42,7 +42,7 @@ + arm*|sa110) HOST_CPU="arm" ;; + cris*) HOST_CPU="cris" ;; + mips*) HOST_CPU="mips" ;; +- powerpc|powerpc64) HOST_CPU="ppc" ;; ++ powerpc|powerpc64|powerpc64le) HOST_CPU="ppc" ;; + sun4u|sparc64) HOST_CPU="sparc" ;; + s390x) HOST_CPU="s390" ;; + i?86|x86_64) HOST_CPU="x86" ;; +@@ -168,6 +168,7 @@ + i?86) UNWIND_ARCH="x86" ;; + powerpc) UNWIND_ARCH="ppc32" ;; + powerpc64) UNWIND_ARCH="ppc64" ;; ++ powerpc64le) UNWIND_ARCH="ppc64le" ;; + mips*) UNWIND_ARCH="mips" ;; + *) UNWIND_ARCH="${host_cpu}" ;; + esac +Index: b/config/autoconf/config.guess +=================================================================== +--- a/config/autoconf/config.guess ++++ b/config/autoconf/config.guess +@@ -952,6 +952,9 @@ + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; ++ ppc64le:Linux:*:*) ++ echo powerpc64le-unknown-linux-gnu ++ exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; +Index: b/config/m4/libtool.m4 +=================================================================== +--- a/config/m4/libtool.m4 ++++ b/config/m4/libtool.m4 +@@ -1285,6 +1285,9 @@ + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; ++ ppc64le-*linux*|powerpc64le-*linux*) ++ LD="${LD-ld} -m elf32lppclinux" ++ ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; +@@ -1304,6 +1307,9 @@ + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; ++ ppc64-*linux*|powerpc64-*linux*) ++ LD="${LD-ld} -m elf64lppc" ++ ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; +Index: b/configure +=================================================================== +--- a/configure ++++ b/configure +@@ -2552,7 +2552,7 @@ + arm*|sa110) HOST_CPU="arm" ;; + cris*) HOST_CPU="cris" ;; + mips*) HOST_CPU="mips" ;; +- powerpc|powerpc64) HOST_CPU="ppc" ;; ++ powerpc|powerpc64|powerpc64le) HOST_CPU="ppc" ;; + sun4u|sparc64) HOST_CPU="sparc" ;; + s390x) HOST_CPU="s390" ;; + i?86|x86_64) HOST_CPU="x86" ;; +@@ -5747,6 +5747,9 @@ + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; ++ ppc64le-*linux*|powerpc64le-*linux*) ++ LD="${LD-ld} -m elf32lppclinux" ++ ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; +@@ -5763,9 +5766,12 @@ + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; +- ppc*-*linux*|powerpc*-*linux*) ++ ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; ++ ppc64le-*linux*|powerpc64le-*linux*) ++ LD="${LD-ld} -m elf64lppc" ++ ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; +Index: b/ltrace-elf.c +=================================================================== +--- a/ltrace-elf.c ++++ b/ltrace-elf.c +@@ -714,6 +714,9 @@ + continue; + } + ++#if _CALL_ELF == 2 ++ naddr += PPC64_LOCAL_ENTRY_OFFSET (sym.st_other); ++#endif + char *full_name; + int own_full_name = 1; + if (name_copy == NULL) { +Index: b/sysdeps/linux-gnu/ppc/arch.h +=================================================================== +--- a/sysdeps/linux-gnu/ppc/arch.h ++++ b/sysdeps/linux-gnu/ppc/arch.h +@@ -24,7 +24,6 @@ + + #include + +-#define BREAKPOINT_VALUE { 0x7f, 0xe0, 0x00, 0x08 } + #define BREAKPOINT_LENGTH 4 + #define DECR_PC_AFTER_BREAK 0 + +@@ -34,15 +33,28 @@ + #ifdef __powerpc64__ // Says 'ltrace' is 64 bits, says nothing about target. + #define LT_ELFCLASS2 ELFCLASS64 + #define LT_ELF_MACHINE2 EM_PPC64 ++#if _CALL_ELF == 2 ++#undef ARCH_SUPPORTS_OPD ++#else + #define ARCH_SUPPORTS_OPD + #endif ++#ifdef __LITTLE_ENDIAN__ ++#define BREAKPOINT_VALUE { 0x08, 0x00, 0xe0, 0x7f } ++#define ARCH_ENDIAN_LITTLE ++#else ++#define BREAKPOINT_VALUE { 0x7f, 0xe0, 0x00, 0x08 } ++#define ARCH_ENDIAN_BIG ++#endif ++#else /* is not __powerpc64__ */ ++#define BREAKPOINT_VALUE { 0x7f, 0xe0, 0x00, 0x08 } ++#define ARCH_ENDIAN_BIG ++#endif + + #define ARCH_HAVE_ATOMIC_SINGLESTEP + #define ARCH_HAVE_ADD_PLT_ENTRY + #define ARCH_HAVE_TRANSLATE_ADDRESS + #define ARCH_HAVE_DYNLINK_DONE + #define ARCH_HAVE_FETCH_ARG +-#define ARCH_ENDIAN_BIG + #define ARCH_HAVE_SIZEOF + #define ARCH_HAVE_ALIGNOF + +Index: b/sysdeps/linux-gnu/ppc/fetch.c +=================================================================== +--- a/sysdeps/linux-gnu/ppc/fetch.c ++++ b/sysdeps/linux-gnu/ppc/fetch.c +@@ -65,16 +65,36 @@ + + }; + ++enum homogeneous_type { ++ NOINIT = 0, ++ HETEROGENEOUS, ++ HOMOGENEOUS, ++ HOMOGENEOUS_NESTED_FLOAT, ++}; ++ ++struct struct_attributes { ++ struct arg_type_info *info; ++ enum arg_type type; ++ size_t nb_elements; ++ enum homogeneous_type homogeneous; ++}; ++ + static int + fetch_context_init(struct Process *proc, struct fetch_context *context) + { + context->greg = 3; + context->freg = 1; + ++#if _CALL_ELF == 2 ++#define STACK_FRAME_OVERHEAD 96 ++#else ++#define STACK_FRAME_OVERHEAD 112 ++#endif + if (proc->e_machine == EM_PPC) + context->stack_pointer = proc->stack_pointer + 8; + else +- context->stack_pointer = proc->stack_pointer + 112; ++ context->stack_pointer = proc->stack_pointer + ++ STACK_FRAME_OVERHEAD; + + /* When ltrace is 64-bit, we might use PTRACE_GETREGS to + * obtain 64-bit as well as 32-bit registers. But if we do it +@@ -107,6 +127,57 @@ + return 0; + } + ++#if _CALL_ELF == 2 ++static int ++get_struct_attribut(struct arg_type_info *info, struct Process *proc, ++ size_t *size_of, struct struct_attributes *struct_attr) ++{ ++ size_t n = type_aggregate_size(info); ++ if (n == (size_t)-1) ++ return ARGTYPE_VOID; ++ ++ enum arg_type type = ARGTYPE_VOID; ++ ++ while (n-- > 0) { ++ struct arg_type_info *emt = type_element(info, n); ++ enum arg_type emt_type = emt->type; ++ ++ if (emt_type != ARGTYPE_STRUCT) { ++ (struct_attr->nb_elements)++; ++ if (struct_attr->homogeneous == NOINIT) { ++ struct_attr->info = emt; ++ struct_attr->type = emt_type; ++ ++ if (emt_type == ARGTYPE_DOUBLE || ++ emt_type == ARGTYPE_FLOAT) ++ struct_attr->homogeneous = ++ HOMOGENEOUS_NESTED_FLOAT; ++ else ++ struct_attr->homogeneous = HOMOGENEOUS; ++ } else { ++ if (struct_attr->type != emt_type) ++ struct_attr->homogeneous = HETEROGENEOUS; ++ } ++ } ++ ++ if (emt_type == ARGTYPE_STRUCT) { ++ emt_type = get_struct_attribut(emt, proc, size_of, ++ struct_attr); ++ } else { ++ size_t size = type_sizeof(proc, emt); ++ if (size == (size_t)-1) ++ return -1; ++ *size_of += size; ++ } ++ ++ type = emt_type; ++ } ++ ++ assert(type != ARGTYPE_STRUCT); ++ return type; ++} ++#endif ++ + struct fetch_context * + arch_fetch_arg_init(enum tof type, struct Process *proc, + struct arg_type_info *ret_info) +@@ -118,6 +189,7 @@ + return NULL; + } + ++#if _CALL_ELF != 2 + /* Aggregates or unions of any length, and character strings + * of length longer than 8 bytes, will be returned in a + * storage buffer allocated by the caller. The caller will +@@ -125,6 +197,40 @@ + * in r3, causing the first explicit argument to be passed in + * r4. */ + context->ret_struct = ret_info->type == ARGTYPE_STRUCT; ++#else ++ /* There are two changes regarding structure return types: ++ * * homogeneous float/vector structs are returned ++ * in (multiple) FP/vector registers, ++ * instead of via implicit reference. ++ * * small structs (up to 16 bytes) are return ++ * in one or two GPRs, instead of via implicit reference. ++ ++ * Other structures (larger than 16 bytes, not homogeneous) ++ * are still returned via implicit reference (i.e. a pointer ++ * to memory where to return the struct being passed in r3). ++ * Of course, whether or not an implicit reference pointer ++ * is present will shift the remaining arguments, ++ * so you need to get this right for ELFv2 in order ++ * to get the arguments correct. */ ++ ++ struct struct_attributes struct_attr; ++ struct_attr.homogeneous = NOINIT; ++ struct_attr.nb_elements = 0; ++ size_t ret_size = 0; ++ context->ret_struct = 0; ++ ++ if (ret_info->type == ARGTYPE_STRUCT) { ++ get_struct_attribut(ret_info, proc, &ret_size, &struct_attr); ++ ++ if (((struct_attr.homogeneous == HOMOGENEOUS_NESTED_FLOAT) && ++ (struct_attr.nb_elements > 8)) || ++ (((struct_attr.homogeneous == HOMOGENEOUS) || ++ (struct_attr.homogeneous == HETEROGENEOUS)) && ++ (ret_size > 16))) ++ ++ context->ret_struct = 1; ++ } ++#endif + if (context->ret_struct) + context->greg++; + +@@ -275,6 +381,56 @@ + return allocate_stack_slot(ctx, proc, info, valuep); + } + ++struct arg_type_info * ++arch_type_get_fp_equivalent(struct arg_type_info *info, struct Process *proc) ++{ ++#if _CALL_ELF != 2 ++ info = type_get_fp_equivalent(info); ++ return info; ++#else ++ struct struct_attributes struct_attr; ++ struct_attr.homogeneous = NOINIT; ++ struct_attr.nb_elements = 0; ++ size_t ret_size = 0; ++ ++ if (info->type == ARGTYPE_STRUCT) { ++ enum arg_type elm_type = ++ get_struct_attribut(info, proc, &ret_size, &struct_attr); ++ ++ if ((struct_attr.nb_elements <= 8) && ++ ((struct_attr.homogeneous == HOMOGENEOUS) || ++ (struct_attr.homogeneous == HOMOGENEOUS_NESTED_FLOAT)) && ++ ((elm_type == ARGTYPE_FLOAT) || ++ (elm_type == ARGTYPE_DOUBLE))) ++ info = struct_attr.info; ++ else ++ return NULL; ++ } ++ ++ switch (info->type) { ++ case ARGTYPE_CHAR: ++ case ARGTYPE_SHORT: ++ case ARGTYPE_INT: ++ case ARGTYPE_LONG: ++ case ARGTYPE_UINT: ++ case ARGTYPE_ULONG: ++ case ARGTYPE_USHORT: ++ case ARGTYPE_VOID: ++ case ARGTYPE_ARRAY: ++ case ARGTYPE_POINTER: ++ return NULL; ++ ++ case ARGTYPE_FLOAT: ++ case ARGTYPE_DOUBLE: ++ return info; ++ ++ case ARGTYPE_STRUCT: ++ abort(); ++ } ++ abort(); ++#endif ++} ++ + static int + allocate_argument(struct fetch_context *ctx, struct Process *proc, + struct arg_type_info *info, struct value *valuep) +@@ -327,6 +483,28 @@ + if (sz == (size_t)-1) + return -1; + size_t slots = (sz + width - 1) / width; /* Round up. */ ++#if _CALL_ELF == 2 ++ if (info->type == ARGTYPE_STRUCT) { ++ enum arg_type elm_type; ++ struct struct_attributes struct_attr; ++ struct_attr.homogeneous = NOINIT; ++ struct_attr.nb_elements = 0; ++ size_t dummy = 0; ++ ++ elm_type = ++ get_struct_attribut(info, proc, &dummy, &struct_attr); ++ if ((struct_attr.nb_elements <= 8) && ++ ((struct_attr.homogeneous == HOMOGENEOUS) || ++ (struct_attr.homogeneous == HOMOGENEOUS_NESTED_FLOAT)) && ++ (elm_type == ARGTYPE_FLOAT)) { ++ /* adjust sizes for float */ ++ width = 4; ++ sz = width * struct_attr.nb_elements; ++ slots = (size_t)struct_attr.nb_elements; ++ } ++ } ++#endif ++ + unsigned char *buf = value_reserve(valuep, slots * width); + if (buf == NULL) + return -1; +@@ -344,7 +522,7 @@ + aggregates within aggregates ad infinitum. */ + int rc; + struct arg_type_info *fp_info +- = type_get_fp_equivalent(valuep->type); ++ = arch_type_get_fp_equivalent(valuep->type, proc); + if (fp_info != NULL) + rc = allocate_float(ctx, proc, fp_info, &val); + else +@@ -356,13 +534,18 @@ + } + value_destroy(&val); + ++#if _CALL_ELF != 2 + /* Bail out if we failed or if we are dealing with + * FP-equivalent. Those don't need the adjustments + * made below. */ + if (rc < 0 || fp_info != NULL) ++#else ++ if (rc < 0) ++#endif + return rc; + } + ++#ifndef __LITTLE_ENDIAN__ + /* Small values need post-processing. */ + if (sz < width) { + switch (info->type) { +@@ -394,7 +577,7 @@ + break; + } + } +- ++#endif + return 0; + } + +Index: b/sysdeps/linux-gnu/ppc/plt.c +=================================================================== +--- a/sysdeps/linux-gnu/ppc/plt.c ++++ b/sysdeps/linux-gnu/ppc/plt.c +@@ -113,7 +113,11 @@ + */ + + #define PPC_PLT_STUB_SIZE 16 ++#if _CALL_ELF != 2 + #define PPC64_PLT_STUB_SIZE 8 //xxx ++#else ++#define PPC64_PLT_STUB_SIZE 4 //xxx ++#endif + + static inline int + host_powerpc64() +@@ -221,7 +225,11 @@ + if ((insn1 & BRANCH_MASK) == B_INSN + || ((insn2 & BRANCH_MASK) == B_INSN + /* XXX double cast */ ++#ifdef __LITTLE_ENDIAN__ ++ && (ppc_branch_dest(libsym->enter_addr + 4, insn1) ++#else + && (ppc_branch_dest(libsym->enter_addr + 4, insn2) ++#endif + == (void*)(long)libsym->lib->arch.pltgot_addr))) + mark_as_resolved(libsym, libsym->arch.resolved_value); + +@@ -249,7 +257,11 @@ + * that case we put brakpoints to PLT entries the same + * as the PPC32 secure PLT case does. */ + assert(lte->arch.plt_stub_vma != 0); ++#if _CALL_ELF == 2 ++ return lte->arch.plt_stub_vma -4 + PPC64_PLT_STUB_SIZE * ndx; ++#else + return lte->arch.plt_stub_vma + PPC64_PLT_STUB_SIZE * ndx; ++#endif + } + } + +@@ -261,6 +273,7 @@ + arch_translate_address_dyn(struct Process *proc, + arch_addr_t addr, arch_addr_t *ret) + { ++#if _CALL_ELF != 2 + if (proc->e_machine == EM_PPC64) { + uint64_t value; + if (read_target_8(proc, addr, &value) < 0) { +@@ -274,7 +287,7 @@ + *ret = (arch_addr_t)(uintptr_t)value; + return 0; + } +- ++#endif + *ret = addr; + return 0; + } +@@ -283,7 +296,8 @@ + arch_translate_address(struct ltelf *lte, + arch_addr_t addr, arch_addr_t *ret) + { +- if (lte->ehdr.e_machine == EM_PPC64) { ++ if (lte->ehdr.e_machine == EM_PPC64 && ++ (lte->ehdr.e_flags & 3) != 2 ) { + /* XXX The double cast should be removed when + * arch_addr_t becomes integral type. */ + GElf_Xword offset +@@ -429,6 +443,7 @@ + arch_elf_init(struct ltelf *lte, struct library *lib) + { + if (lte->ehdr.e_machine == EM_PPC64 ++ && (lte->ehdr.e_flags & 3) != 2 + && load_opd_data(lte, lib) < 0) + return -1; + +@@ -569,7 +584,7 @@ + uint64_t l; + /* XXX double cast. */ + if (read_target_8(proc, (arch_addr_t)(uintptr_t)addr, &l) < 0) { +- fprintf(stderr, "ptrace .plt slot value @%#" PRIx64": %s\n", ++ debug(DEBUG_EVENT, "ptrace .plt slot value @%#" PRIx64": %s", + addr, strerror(errno)); + return -1; + } +@@ -652,8 +667,17 @@ + || plt_slot_addr < lte->plt_addr + lte->plt_size); + + GElf_Addr plt_slot_value; +- if (read_plt_slot_value(proc, plt_slot_addr, &plt_slot_value) < 0) ++ if (read_plt_slot_value(proc, plt_slot_addr, &plt_slot_value) < 0) { ++#if _CALL_ELF != 2 + return plt_fail; ++#else ++ /* With ABIv2, depending on how libc.so and ld.so are ++ constructed (see Debian/Ubuntu) stub area may not ++ be initialized requiring the common process to do it ++ usually making symbols latent */ ++ return plt_default; ++#endif ++ } + + char *name = strdup(a_name); + struct library_symbol *libsym = malloc(sizeof(*libsym)); +@@ -846,9 +870,11 @@ + (struct process_stopping_handler *); + + case PPC_DEFAULT: ++#if _CALL_ELF !=2 + assert(proc->e_machine == EM_PPC); + assert(bp->libsym != NULL); + assert(bp->libsym->lib->arch.bss_plt_prelinked == 0); ++#endif + /* Fall through. */ + + case PPC_PLT_UNRESOLVED: +Index: b/sysdeps/linux-gnu/ppc/trace.c +=================================================================== +--- a/sysdeps/linux-gnu/ppc/trace.c ++++ b/sysdeps/linux-gnu/ppc/trace.c +@@ -64,7 +64,11 @@ + && WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) { + long pc = (long)get_instruction_pointer(proc); + int insn = ++#ifndef __LITTLE_ENDIAN__ + (int)ptrace(PTRACE_PEEKTEXT, proc->pid, pc - sizeof(long), ++#else ++ (int)ptrace(PTRACE_PEEKTEXT, proc->pid, pc - sizeof(int), ++#endif + 0); + + if (insn == SYSCALL_INSN) { +@@ -122,13 +126,19 @@ + int insn_count; + arch_addr_t addr = ip; + for (insn_count = 0; ; ++insn_count) { ++#if (!defined(__LITTLE_ENDIAN__)) || (_CALL_ELF == 2) + addr += 4; ++#endif + unsigned long l = ptrace(PTRACE_PEEKTEXT, proc->pid, addr, 0); + if (l == (unsigned long)-1 && errno) + return -1; + uint32_t insn; + #ifdef __powerpc64__ ++#ifdef __LITTLE_ENDIAN__ ++ insn = (uint32_t) l ; ++#else + insn = l >> 32; ++#endif + #else + insn = l; + #endif diff -Nru ltrace-0.7.3/debian/patches/ptrace.diff ltrace-0.7.3/debian/patches/ptrace.diff --- ltrace-0.7.3/debian/patches/ptrace.diff 1970-01-01 00:00:00.000000000 +0000 +++ ltrace-0.7.3/debian/patches/ptrace.diff 2014-01-06 12:09:38.000000000 +0000 @@ -0,0 +1,18 @@ +--- ltrace-0.7.3.orig/sysdeps/linux-gnu/trace.c ++++ ltrace-0.7.3/sysdeps/linux-gnu/trace.c +@@ -104,8 +104,14 @@ trace_pid(pid_t pid) + /* This shouldn't emit error messages, as there are legitimate + * reasons that the PID can't be attached: like it may have + * already ended. */ +- if (ptrace(PTRACE_ATTACH, pid, 0, 0) < 0) ++ if (ptrace(PTRACE_ATTACH, pid, 0, 0) < 0) { ++ if (errno == EPERM) ++ fprintf(stderr, ++ "Could not attach to process. If your uid matches the uid of the target\n" ++ "process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try\n" ++ "again as the root user. For more details, see /etc/sysctl.d/10-ptrace.conf\n"); + return -1; ++ } + + return wait_for_proc(pid); + } diff -Nru ltrace-0.7.3/debian/patches/series ltrace-0.7.3/debian/patches/series --- ltrace-0.7.3/debian/patches/series 2014-01-03 12:25:55.000000000 +0000 +++ ltrace-0.7.3/debian/patches/series 2014-03-20 14:49:16.000000000 +0000 @@ -4,3 +4,10 @@ 04-compile-warning 05-sparc-ftbfs 06-unexpected-breakpoint +ptrace.diff +ppc64el.diff +Move-get_hfa_type-from-IA64-backend-to-type.c-name-i.patch +Set-child-stack-alignment-in-trace-clone.c.patch +Implement-aarch64-support.patch +add-missing-stdint.h-include.patch +Add-missing-include-stdio.h.patch diff -Nru ltrace-0.7.3/debian/rules ltrace-0.7.3/debian/rules --- ltrace-0.7.3/debian/rules 2014-01-03 11:46:17.000000000 +0000 +++ ltrace-0.7.3/debian/rules 2014-03-20 14:49:16.000000000 +0000 @@ -2,7 +2,12 @@ cdbs_configure_flags := --with-libunwind=no +# The configure logic for this is backwards. We need this before checking +# for elfutils (ELF_C_READ_MMAP) +CFLAGS=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE + include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/rules/autoreconf.mk include /usr/share/cdbs/1/class/autotools.mk install/ltrace::