summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorchristos <christos@pkgsrc.org>2007-04-28 03:42:30 +0000
committerchristos <christos@pkgsrc.org>2007-04-28 03:42:30 +0000
commit3138b719957e49b0f65cb1fa3ccb2ba679b6184b (patch)
treeddc7711f8dd038a8af5c7b28f0aa552cd0edfe9e /sysutils
parent801dd9ecd168ff64bec68a7ae6c1a61b5351834d (diff)
downloadpkgsrc-3138b719957e49b0f65cb1fa3ccb2ba679b6184b.tar.gz
make x86_64 work.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/strace/distinfo14
-rw-r--r--sysutils/strace/patches/patch-aj10
-rw-r--r--sysutils/strace/patches/patch-au52
-rw-r--r--sysutils/strace/patches/patch-ay13
4 files changed, 51 insertions, 38 deletions
diff --git a/sysutils/strace/distinfo b/sysutils/strace/distinfo
index 15686b3092d..f2647072b64 100644
--- a/sysutils/strace/distinfo
+++ b/sysutils/strace/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2007/04/27 19:45:01 christos Exp $
+$NetBSD: distinfo,v 1.6 2007/04/28 03:42:30 christos Exp $
SHA1 (strace-4.5.14.tar.bz2) = 72c17d1dd6786d22ca0aaaa7292b8edcd70a27de
RMD160 (strace-4.5.14.tar.bz2) = cb42cac34d1624dd24842ada0dbb9dfff67e8e93
@@ -12,7 +12,7 @@ SHA1 (patch-af) = 5e12fe5d4087275e889a49a63ce4d0e0b565b5d8
SHA1 (patch-ag) = 02c6ce49d7bcefb97e69acc630b5bf82a8bb8a1d
SHA1 (patch-ah) = ad11dff799e48ae9592cb2bb688602637b72f3e2
SHA1 (patch-ai) = 01430e21dd0e6d2e19f93fab8846a3464ee5e7a0
-SHA1 (patch-aj) = 67cf49628622bca7ed3a14c1b014e97b58ebbaba
+SHA1 (patch-aj) = b5adc80e0d3f949e8d4d1c9fcbd49839a6b4d907
SHA1 (patch-ak) = 7b34a03fa9c8761038ef9b19f8ecbded2cc656b8
SHA1 (patch-al) = ea408e93a15c5fdd8054a65b409c60536ca928eb
SHA1 (patch-am) = edb9a6a4b76b6f0a39427562fe96a73fea3ecf4a
@@ -23,11 +23,11 @@ SHA1 (patch-aq) = ed501801c93f1b4f9549fce5804f02a98a6d8c18
SHA1 (patch-ar) = 12b13f8b7e2054cbe57da6b502f3fe49b91de9ff
SHA1 (patch-as) = b241a70fb33aabb8282578a124b04aca05f0d3f2
SHA1 (patch-at) = da44d0101eb069ea231bdce7051af357e43cb3d1
-SHA1 (patch-au) = ad22866dba3248bdd94f0011d649c092886c13d6
-SHA1 (patch-av) = 039e074373167eb895b2af0a66e5b29ad409496a
-SHA1 (patch-aw) = 6a0d47a187e9aed739f809a68725630157ac2333
-SHA1 (patch-ax) = 21045db2efb1cde53a9f9ef7aeb76e09f9ae1d0b
-SHA1 (patch-ay) = 366a8e42d65a7ffa65b96c32018e5bdbbf67f43e
+SHA1 (patch-au) = fe4c23730ec3bb5624eb49cc981441ccb4b4a620
+SHA1 (patch-av) = fc31e45bf956cf5ddc09e01a7b1a02f15ece7968
+SHA1 (patch-aw) = 6d9c8243df401fb18e621c8965667778640c9d01
+SHA1 (patch-ax) = 6bb4fdfaf26f9ded736f0aa8f0209815ccbea199
+SHA1 (patch-ay) = 9a6942117fc4d26a9256a573559597560295d9c0
SHA1 (patch-az) = af6272c48668785dffd7c5b42b8fa2c8edb562d0
SHA1 (patch-ba) = be8e2f79bd8818b99bdce63fb73802f1a4014b2f
SHA1 (patch-bb) = 044c9a3a1fe88d0c8d12012012dc0428fde5a5c5
diff --git a/sysutils/strace/patches/patch-aj b/sysutils/strace/patches/patch-aj
index 8a889af8f2c..4b3ab2fb014 100644
--- a/sysutils/strace/patches/patch-aj
+++ b/sysutils/strace/patches/patch-aj
@@ -1,10 +1,10 @@
-$NetBSD: patch-aj,v 1.2 2007/04/27 19:45:01 christos Exp $
+$NetBSD: patch-aj,v 1.3 2007/04/28 03:42:31 christos Exp $
---- /dev/null 2007-04-26 23:20:40.000000000 -0400
-+++ netbsd/ioctlent.sh 2007-04-27 14:49:01.000000000 -0400
+--- /dev/null 2007-04-27 23:20:36.000000000 -0400
++++ netbsd/ioctlent.sh 2007-04-27 23:27:49.000000000 -0400
@@ -0,0 +1,123 @@
+#!/bin/sh
-+# $NetBSD: patch-aj,v 1.2 2007/04/27 19:45:01 christos Exp $
++# $NetBSD: patch-aj,v 1.3 2007/04/28 03:42:31 christos Exp $
+#
+# Copyright (c) 1994
+# The Regents of the University of California. All rights reserved.
@@ -120,7 +120,7 @@ $NetBSD: patch-aj,v 1.2 2007/04/27 19:45:01 christos Exp $
+ print "\tint i;\n";
+ print "\tfor (i = 0; i < sizeof(ioctlent0) / sizeof(ioctlent0[0]); i++)\n"
+ print "\t\tprintf(\"\t{ \\\"%s\\\", \\\"%s\\\", 0x%x },%c\",\n"
-+ print "\t\t ioctlent0[i].file, ioctlent0[i].name, 0xffff & ioctlent0[i].number, 012);\n"
++ print "\t\t ioctlent0[i].file, ioctlent0[i].name, 0xffffffff & ioctlent0[i].number, 012);\n"
+ print "\treturn 0;\n";
+ print "}\n";
+}' >> ioctlent.c
diff --git a/sysutils/strace/patches/patch-au b/sysutils/strace/patches/patch-au
index 8351c62b910..1e9defa6cb5 100644
--- a/sysutils/strace/patches/patch-au
+++ b/sysutils/strace/patches/patch-au
@@ -1,7 +1,7 @@
-$NetBSD: patch-au,v 1.1 2007/04/27 19:45:02 christos Exp $
+$NetBSD: patch-au,v 1.2 2007/04/28 03:42:31 christos Exp $
--- syscall.c.orig 2006-01-12 05:18:53.000000000 -0500
-+++ syscall.c 2007-04-26 18:09:23.000000000 -0400
++++ syscall.c 2007-04-27 23:32:49.000000000 -0400
@@ -38,9 +38,9 @@
#include <signal.h>
#include <time.h>
@@ -65,7 +65,7 @@ $NetBSD: patch-au,v 1.1 2007/04/27 19:45:02 christos Exp $
if (pread(tcp->pfd_reg, &regs, sizeof(regs), 0) < 0) {
perror("pread");
return -1;
-@@ -1334,8 +1340,45 @@
+@@ -1334,8 +1340,41 @@
scno = regs.r_eax;
break;
}
@@ -97,11 +97,7 @@ $NetBSD: patch-au,v 1.1 2007/04/27 19:45:02 christos Exp $
+ switch (regs.regs[_REG_RAX]) {
+ case SYS_syscall:
+ case SYS___syscall:
-+ if ((scno = ptrace(PTRACE_PEEKUSER, pid,
-+ (char *)regs.regs[_REG_URSP] + sizeof(regs.regs[0]), sizeof(regs.regs[0]))) == -1) {
-+ perror("PEEKUSER __syscall");
-+ return -1;
-+ }
++ scno = regs.regs[_REG_RDI];
+ break;
+ default:
+ scno = regs.regs[_REG_RAX];
@@ -112,7 +108,7 @@ $NetBSD: patch-au,v 1.1 2007/04/27 19:45:02 christos Exp $
#endif /* USE_PROCFS */
if (!(tcp->flags & TCB_INSYSCALL))
tcp->scno = scno;
-@@ -1360,7 +1403,9 @@
+@@ -1360,7 +1399,9 @@
struct tcb *tcp;
{
#ifndef USE_PROCFS
@@ -122,7 +118,7 @@ $NetBSD: patch-au,v 1.1 2007/04/27 19:45:02 christos Exp $
#else /* USE_PROCFS */
int scno = known_scno(tcp);
-@@ -1733,17 +1778,36 @@
+@@ -1733,17 +1774,36 @@
}
#endif /* MIPS */
#endif /* SVR4 */
@@ -161,7 +157,7 @@ $NetBSD: patch-au,v 1.1 2007/04/27 19:45:02 christos Exp $
tcp->u_error = u_error;
return 1;
}
-@@ -1926,6 +1990,32 @@
+@@ -1926,6 +1986,32 @@
return -1;
}
#endif /* FREEBSD */
@@ -194,7 +190,7 @@ $NetBSD: patch-au,v 1.1 2007/04/27 19:45:02 christos Exp $
/* All branches reach here on success (only). */
tcp->u_error = error;
-@@ -1938,7 +2028,9 @@
+@@ -1938,7 +2024,9 @@
struct tcb *tcp;
{
#ifndef USE_PROCFS
@@ -204,7 +200,7 @@ $NetBSD: patch-au,v 1.1 2007/04/27 19:45:02 christos Exp $
#endif /* !USE_PROCFS */
#ifdef LINUX
#if defined(S390) || defined(S390X)
-@@ -2236,6 +2328,50 @@
+@@ -2236,6 +2324,58 @@
I DONT KNOW WHAT TO DO
#endif /* !HAVE_PR_SYSCALL */
#endif /* SVR4 */
@@ -233,29 +229,37 @@ $NetBSD: patch-au,v 1.1 2007/04/27 19:45:02 christos Exp $
+ }
+#endif
+#ifdef __x86_64__
++{
++ int bias, i;
++ static int ar[2][6] = {
++ { _REG_RDI, _REG_RSI, _REG_RDX,
++ _REG_R10, _REG_R8, _REG_R9 }, /* x86-64 ABI */
++ { _REG_RBX, _REG_RCX, _REG_RDX,
++ _REG_RSI, _REG_RDI, _REG_RBP } /* i386 ABI */
++ };
+ switch(regs.regs[_REG_RAX]) {
+ case SYS___syscall:
-+ umoven(tcp, regs.regs[_REG_URSP] + sizeof(regs.regs[0]) + sizeof(quad_t),
-+ tcp->u_nargs * sizeof(unsigned long),
-+ (char *) tcp->u_arg);
-+ break;
+ case SYS_syscall:
-+ umoven(tcp, regs.regs[_REG_URSP] + 2 * sizeof(regs.regs[0]),
-+ tcp->u_nargs * sizeof(unsigned long),
-+ (char *) tcp->u_arg);
++ bias = 1;
+ break;
+ default:
-+ umoven(tcp, regs.regs[_REG_URSP] + sizeof(regs.regs[0]),
-+ tcp->u_nargs * sizeof(unsigned long),
-+ (char *) tcp->u_arg);
++ bias = 0;
+ break;
+ }
++ for (i = 0; i < tcp->u_nargs; i++) {
++ tcp->u_arg[i] = regs.regs[ar[0][i + bias]];
++#if 0
++ if (upeek(tcp->pid, ar[0][i + bias] * 8, &tcp->u_arg[i]) < 0)
++ return -1;
++#endif
++ }
++}
+#endif
+#endif /* NETBSD */
#ifdef FREEBSD
if (tcp->scno >= 0 && tcp->scno < nsyscalls &&
sysent[tcp->scno].nargs > tcp->status.val)
-@@ -2648,6 +2784,19 @@
+@@ -2648,6 +2788,19 @@
pread(tcp->pfd_reg, &regs, sizeof(regs), 0);
val = regs.r_edx;
#endif
diff --git a/sysutils/strace/patches/patch-ay b/sysutils/strace/patches/patch-ay
index b8e50180bca..6ced4f2f87d 100644
--- a/sysutils/strace/patches/patch-ay
+++ b/sysutils/strace/patches/patch-ay
@@ -1,7 +1,7 @@
-$NetBSD: patch-ay,v 1.1 2007/04/27 19:45:03 christos Exp $
+$NetBSD: patch-ay,v 1.2 2007/04/28 03:42:31 christos Exp $
--- system.c.orig 2006-01-12 16:21:06.000000000 -0500
-+++ system.c 2007-04-27 11:35:28.000000000 -0400
++++ system.c 2007-04-27 19:00:30.000000000 -0400
@@ -568,7 +568,7 @@
#endif /* SUNOS4 */
@@ -40,3 +40,12 @@ $NetBSD: patch-ay,v 1.1 2007/04/27 19:45:03 christos Exp $
if (entering(tcp)) {
if (tcp->u_arg[1] < 0 || tcp->u_arg[1] > CTL_MAXNAME ||
+@@ -2016,7 +2018,7 @@
+ } else {
+ if (!syserror(tcp) && (umove(tcp, tcp->u_arg[3], &len) >= 0)) {
+ printstr(tcp, tcp->u_arg[2], len);
+- tprintf(", [%u], ", len);
++ tprintf(", [%zu], ", (size_t)len);
+ } else
+ tprintf("%#lx, %#lx, ", tcp->u_arg[2], tcp->u_arg[3]);
+ printstr(tcp, tcp->u_arg[4], tcp->u_arg[5]);