diff options
Diffstat (limited to 'dev-util/strace/files')
-rw-r--r-- | dev-util/strace/files/digest-strace-4.5.15 | 3 | ||||
-rw-r--r-- | dev-util/strace/files/strace-4.5.11-alpha-stat64.patch | 37 | ||||
-rw-r--r-- | dev-util/strace/files/strace-4.5.11-fbsd.patch | 181 | ||||
-rw-r--r-- | dev-util/strace/files/strace-4.5.12-libaio.patch | 60 | ||||
-rw-r--r-- | dev-util/strace/files/strace-4.5.12-quota.patch | 89 | ||||
-rw-r--r-- | dev-util/strace/files/strace-4.5.12-superh-update.patch | 24 | ||||
-rw-r--r-- | dev-util/strace/files/strace-4.5.14-CTL_PROC.patch | 17 | ||||
-rw-r--r-- | dev-util/strace/files/strace-4.5.14-PT_GETSIGINFO.patch | 18 | ||||
-rw-r--r-- | dev-util/strace/files/strace-4.5.15-mips-sigcontext.patch | 22 | ||||
-rw-r--r-- | dev-util/strace/files/strace-4.5.15-mips-sprintsigmask.patch | 13 | ||||
-rw-r--r-- | dev-util/strace/files/strace-4.5.8-ia64.patch | 97 | ||||
-rw-r--r-- | dev-util/strace/files/strace-dont-use-REG_SYSCALL-for-sh.patch | 10 | ||||
-rw-r--r-- | dev-util/strace/files/strace-fix-arm-bad-syscall.patch | 20 | ||||
-rw-r--r-- | dev-util/strace/files/strace-superh-update.patch | 28 | ||||
-rw-r--r-- | dev-util/strace/files/strace-undef-syscall.patch | 15 |
15 files changed, 634 insertions, 0 deletions
diff --git a/dev-util/strace/files/digest-strace-4.5.15 b/dev-util/strace/files/digest-strace-4.5.15 new file mode 100644 index 0000000..bf58fb3 --- /dev/null +++ b/dev-util/strace/files/digest-strace-4.5.15 @@ -0,0 +1,3 @@ +MD5 ef40944118841803391d212cb64d3c5b strace-4.5.15.tar.bz2 455607 +RMD160 0c6aaa8820a0985d89b21a5da9578b27435c8906 strace-4.5.15.tar.bz2 455607 +SHA256 ba8c492c1b2033d4e2131f05df9e3780d4bc35bea87aa32a6052dd53a814e288 strace-4.5.15.tar.bz2 455607 diff --git a/dev-util/strace/files/strace-4.5.11-alpha-stat64.patch b/dev-util/strace/files/strace-4.5.11-alpha-stat64.patch new file mode 100644 index 0000000..e55f61d --- /dev/null +++ b/dev-util/strace/files/strace-4.5.11-alpha-stat64.patch @@ -0,0 +1,37 @@ +Hack around an ugly issue. The only arch to provide the st_flags and st_gen +members of the stat structure is alpha. However, alpha only provides it for +stat and not stat64. So the autoconf script checks the stat structure for +all the relevant members but does not check stat64, thus setting up defines +that say these two members are present. To make matters worse, glibc defines +(via sys/stat.h -> bits/stat.h) both stat and stat64 with the st_flags and +st_gen members. Since file.c makes sure to hide the glibc defines and use the +kernel defines, even if we tried to detect stat64.st_flags and stat64.st_gen +in the autoconf script, the glibc headers would be parsed thereforce providing +false positives. + +--- file.c ++++ file.c +@@ -997,13 +997,6 @@ + tprintf("st_atime=%s, ", sprinttime(statbuf.st_atime)); + tprintf("st_mtime=%s, ", sprinttime(statbuf.st_mtime)); + tprintf("st_ctime=%s", sprinttime(statbuf.st_ctime)); +-#if HAVE_STRUCT_STAT_ST_FLAGS +- tprintf(", st_flags="); +- if (statbuf.st_flags) { +- printflags(fileflags, statbuf.st_flags); +- } else +- tprintf("0"); +-#endif + #if HAVE_STRUCT_STAT_ST_ACLCNT + tprintf(", st_aclcnt=%d", statbuf.st_aclcnt); + #endif +@@ -1014,9 +1007,6 @@ + tprintf(", st_fstype=%.*s", + (int) sizeof statbuf.st_fstype, statbuf.st_fstype); + #endif +-#if HAVE_STRUCT_STAT_ST_GEN +- tprintf(", st_gen=%u", statbuf.st_gen); +-#endif + tprintf("}"); + } + else diff --git a/dev-util/strace/files/strace-4.5.11-fbsd.patch b/dev-util/strace/files/strace-4.5.11-fbsd.patch new file mode 100644 index 0000000..1c1e31f --- /dev/null +++ b/dev-util/strace/files/strace-4.5.11-fbsd.patch @@ -0,0 +1,181 @@ +Add support for FreeBSD. + +Patch by Piego Pettenò + +http://bugs.gentoo.org/93657 + +--- strace-4.5.11/configure.ac ++++ strace-4.5.11/configure.ac +@@ -192,16 +192,24 @@ + fi + + AC_CHECK_FUNCS(sigaction strerror strsignal pread sys_siglist _sys_siglist getdents mctl prctl sendmsg inet_ntop if_indextoname) +-AC_CHECK_HEADERS([sys/reg.h sys/filio.h sys/acl.h sys/asynch.h sys/door.h stropts.h sys/conf.h sys/stream.h sys/tihdr.h sys/tiuser.h sys/sysconfig.h ioctls.h sys/ioctl.h sys/ptrace.h termio.h linux/ptrace.h asm/reg.h sys/uio.h sys/aio.h poll.h sys/poll.h sys/vfs.h asm/sysmips.h linux/utsname.h sys/nscsys.h mqueue.h sys/epoll.h], [], []) ++AC_CHECK_HEADERS([sys/reg.h sys/filio.h sys/acl.h sys/asynch.h sys/door.h stropts.h sys/conf.h sys/stream.h sys/tihdr.h sys/tiuser.h sys/sysconfig.h ioctls.h sys/ioctl.h sys/ptrace.h termio.h linux/ptrace.h asm/reg.h sys/uio.h sys/aio.h poll.h sys/poll.h sys/vfs.h asm/sysmips.h linux/utsname.h sys/nscsys.h mqueue.h sys/epoll.h sys/param.h], [], []) + AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h], + [], [], [#include <linux/socket.h>]) + AC_CHECK_HEADERS([asm/sigcontext.h], [], [], [#include <signal.h>]) +-AC_CHECK_HEADERS([netinet/tcp.h netinet/udp.h],,, [#include <netinet/in.h>]) ++AC_CHECK_HEADERS([netinet/tcp.h netinet/udp.h],,, ++[#include <sys/types.h> ++#include <netinet/in.h>]) ++ ++AC_CHECK_HEADERS([sys/mount.h],,, ++[#include <sys/types.h> ++#include <sys/param.h>]) + + AC_MP_PROCFS + AC_POLLABLE_PROCFS + +-AC_CHECK_MEMBERS([struct msghdr.msg_control],,, [#include <sys/socket.h>]) ++AC_CHECK_MEMBERS([struct msghdr.msg_control],,, ++[#include <sys/types.h> ++#include <sys/socket.h>]) + AC_STRUCT_PR_SYSCALL + + AC_CHECK_MEMBERS([struct T_conn_res.QUEUE_ptr, +@@ -209,6 +217,19 @@ + [#include <sys/stream.h> + #include <sys/tihdr.h>]) + ++AC_CHECK_MEMBERS([struct fsid.val, ++ struct fsid.__val],,, ++[#include <sys/types.h> ++#ifdef HAVE_SYS_PARAM_H ++# include <sys/param.h> ++#endif ++#ifdef HAVE_SYS_VFS_H ++# include <sys/vfs.h> ++#endif ++#ifdef HAVE_SYS_MOUNT_H ++# include <sys/mount.h> ++#endif]) ++ + AC_CHECK_TYPES([struct __old_kernel_stat],,, [#include <asm/stat.h>]) + + AC_CHECK_TYPES([struct pt_all_user_regs, struct ia64_fpreg],,, +--- strace-4.5.11/file.c ++++ strace-4.5.11/file.c +@@ -200,6 +200,10 @@ + #include <ustat.h> + #endif + ++#if defined(HAVE_STRUCT_FSID_VAL) && ! defined(HAVE_STRUCT_FSID___VAL) ++#define __val val ++#endif ++ + /* + * This is a really dirty trick but it should always work. Traditional + * Unix says r/w/rw are 0/1/2, so we make them true flags 1/2/3 by +@@ -2495,6 +2499,8 @@ + } + + ++#ifdef LINUX ++ + static const struct xlat advise[] = { + { POSIX_FADV_NORMAL, "POSIX_FADV_NORMAL" }, + { POSIX_FADV_RANDOM, "POSIX_FADV_RANDOM" }, +@@ -2506,7 +2512,6 @@ + }; + + +-#ifdef LINUX + int + sys_fadvise64(tcp) + struct tcb *tcp; +@@ -2524,7 +2529,6 @@ + } + return 0; + } +-#endif + + + int +@@ -2545,3 +2549,5 @@ + } + return 0; + } ++ ++#endif +--- strace-4.5.11/net.c ++++ strace-4.5.11/net.c +@@ -1112,6 +1112,7 @@ + tprintf("}}"); + return; + } ++#ifdef SCM_CREDENTIALS + if (u.cmsg.cmsg_type == SCM_CREDENTIALS + && CMSG_LEN(sizeof(struct ucred)) <= u.cmsg.cmsg_len) { + struct ucred *uc = (struct ucred *) CMSG_DATA (&u.cmsg); +@@ -1119,6 +1120,7 @@ + (long)uc->pid, (long)uc->uid, (long)uc->gid); + return; + } ++#endif + } + tprintf(", ...}"); + } +--- strace-4.5.11/sock.c ++++ strace-4.5.11/sock.c +@@ -46,6 +46,7 @@ + #endif + #endif + #include <net/if.h> ++#include <netinet/in.h> + + extern const struct xlat addrfams[]; + +@@ -55,16 +56,26 @@ + { IFF_DEBUG, "IFF_DEBUG" }, + { IFF_LOOPBACK, "IFF_LOOPBACK" }, + { IFF_POINTOPOINT, "IFF_POINTOPOINT" }, ++#ifdef IFF_NOTRAILERS + { IFF_NOTRAILERS, "IFF_NOTRAILERS" }, ++#endif + { IFF_RUNNING, "IFF_RUNNING" }, + { IFF_NOARP, "IFF_NOARP" }, + { IFF_PROMISC, "IFF_PROMISC" }, + { IFF_ALLMULTI, "IFF_ALLMULTI" }, ++#ifdef IFF_MASTER + { IFF_MASTER, "IFF_MASTER" }, ++#endif ++#ifdef IFF_SLAVE + { IFF_SLAVE, "IFF_SLAVE" }, ++#endif + { IFF_MULTICAST, "IFF_MULTICAST" }, ++#ifdef IFF_PORTSEL + { IFF_PORTSEL, "IFF_PORTSEL" }, ++#endif ++#ifdef IFF_AUTOMEDIA + { IFF_AUTOMEDIA, "IFF_AUTOMEDIA" }, ++#endif + { 0, NULL } + }; + +--- strace-4.5.11/strace.c ++++ strace-4.5.11/strace.c +@@ -617,6 +617,23 @@ + cleanup(); + exit(1); + } ++#ifdef FREEBSD ++ { ++ int status; ++ pid_t err; ++ ++ do { ++ err = waitpid(pid, &status, WUNTRACED); ++ } while (err == -1 && errno == EINTR); ++ if (err == -1) { ++ fprintf(stderr, ++ "waitpid() failed: %s\n", ++ strerror(errno)); ++ cleanup(); ++ exit(1); ++ } ++ } ++#endif + #ifdef USE_PROCFS + if (proc_open(tcp, 0) < 0) { + fprintf(stderr, "trouble opening proc file\n"); diff --git a/dev-util/strace/files/strace-4.5.12-libaio.patch b/dev-util/strace/files/strace-4.5.12-libaio.patch new file mode 100644 index 0000000..e24d3c3 --- /dev/null +++ b/dev-util/strace/files/strace-4.5.12-libaio.patch @@ -0,0 +1,60 @@ +Make libaio support a proper option and update the checks to support +both new and old versions of libaio. + +http://bugs.gentoo.org/103427 + +--- strace/configure.ac ++++ strace/configure.ac +@@ -170,6 +170,26 @@ + struct stat.st_rdev]) + AC_STAT64 + ++AC_ARG_ENABLE(libaio, ++ AC_HELP_STRING([--enable-libaio],[enable support for libaio @<:@default=auto@:>@]), ++ [enable_libaio=$enableval], ++ [enable_libaio=auto] ++) ++if test "x$enable_libaio" != "xno" ; then ++ AC_CHECK_HEADER([libaio.h],[have_libaio=yes],[have_libaio=no]) ++ if test "x$enable_libaio$have_libaio" = "xyesno" ; then ++ AC_MSG_ERROR(Could not detect libaio.h) ++ elif test "x$have_libaio" = "xyes" ; then ++ AC_DEFINE(HAVE_LIBAIO_H, 1, [System has libaio.h]) ++ AC_CHECK_MEMBERS([ ++ struct iocb.data, ++ struct iocb.aio_data, ++ struct iocb.key, ++ struct iocb.aio_key], ++ [], [], [#include <libaio.h>]) ++ fi ++fi ++ + AC_TYPE_SIGNAL + AC_TYPE_UID_T + AC_TYPE_MODE_T +--- strace/desc.c ++++ strace/desc.c +@@ -767,7 +767,11 @@ + continue; + } + tprintf("{%p, %u, %hu, %hu, %d}", ++#ifdef HAVE_STRUCT_IOCB_AIO_DATA ++ iocb.aio_data, iocb.aio_data, ++#else + iocb.data, iocb.key, ++#endif + iocb.aio_lio_opcode, + iocb.aio_reqprio, iocb.aio_fildes); + } +@@ -793,7 +797,11 @@ + #ifdef HAVE_LIBAIO_H + if (umove(tcp, tcp->u_arg[1], &iocb) == 0) { + tprintf("{%p, %u, %hu, %hu, %d}, ", ++#ifdef HAVE_STRUCT_IOCB_AIO_DATA ++ iocb.aio_data, iocb.aio_data, ++#else + iocb.data, iocb.key, ++#endif + iocb.aio_lio_opcode, + iocb.aio_reqprio, iocb.aio_fildes); + } else diff --git a/dev-util/strace/files/strace-4.5.12-quota.patch b/dev-util/strace/files/strace-4.5.12-quota.patch new file mode 100644 index 0000000..161d0fc --- /dev/null +++ b/dev-util/strace/files/strace-4.5.12-quota.patch @@ -0,0 +1,89 @@ +Changes from upstream cvs to fix breakage with newer glibc's + +http://bugs.gentoo.org/102080 + +--- strace-4.5.12/configure.ac ++++ strace-4.5.12/configure.ac +@@ -216,6 +216,8 @@ + + AC_CHECK_TYPES([struct user_desc],,, [#include <asm/ldt.h>]) + ++AC_CHECK_MEMBERS([struct dqblk.dqb_curblocks],,, [#include <sys/quota.h>]) ++ + AC_CHECK_DECLS([sys_errlist]) + AC_CHECK_DECLS([sys_siglist, _sys_siglist],,, [#include <signal.h>]) + +--- strace-4.5.12/resource.c ++++ strace-4.5.12/resource.c +@@ -464,6 +464,7 @@ + + #ifdef LINUX + ++#define OLD_CMD(c) ((c)<<8) + #define NEW_CMD(c) ((0x80<<16)+(c)) + #define XQM_CMD(c) (('X'<<8)+(c)) + #define NEW_COMMAND(c) (( ((c) >> SUBCMDSHIFT) & (0x80 << 16))) +@@ -471,15 +472,15 @@ + #define OLD_COMMAND(c) (!NEW_COMMAND(c) && !XQM_COMMAND(c)) + + static const struct xlat quotacmds[] = { +- { Q_QUOTAON, "Q_QUOTAON" }, +- { Q_QUOTAOFF, "Q_QUOTAOFF" }, +- { Q_GETQUOTA, "Q_GETQUOTA" }, +- { Q_SETQUOTA, "Q_SETQUOTA" }, +- { Q_SETUSE, "Q_SETUSE" }, +- { Q_SYNC, "Q_SYNC" }, +- { Q_SETQLIM, "Q_SETQLIM" }, +- { Q_GETSTATS, "Q_GETSTATS" }, +- { Q_RSQUASH, "Q_RSQUASH" }, ++ { OLD_CMD(0x1), "Q_QUOTAON" }, ++ { OLD_CMD(0x2), "Q_QUOTAOFF" }, ++ { OLD_CMD(0x3), "Q_GETQUOTA" }, ++ { OLD_CMD(0x4), "Q_SETQUOTA" }, ++ { OLD_CMD(0x5), "Q_SETUSE" }, ++ { OLD_CMD(0x6), "Q_SYNC" }, ++ { OLD_CMD(0x7), "Q_SETQLIM" }, ++ { OLD_CMD(0x8), "Q_GETSTATS" }, ++ { OLD_CMD(0x10),"Q_RSQUASH" }, + { NEW_CMD(0x1), "Q_SYNC" }, + { NEW_CMD(0x2), "Q_QUOTAON" }, + { NEW_CMD(0x3), "Q_QUOTAOFF" }, +@@ -528,21 +529,29 @@ + + if (!tcp->u_arg[3]) + tprintf("NULL"); +- else if (!verbose(tcp) || !OLD_COMMAND(cmd)) ++ else if (!verbose(tcp) || ++#ifdef HAVE_STRUCT_DQBLK_DQB_CURBLOCKS ++ ! ++#endif ++ OLD_COMMAND(cmd)) + tprintf("%#lx", tcp->u_arg[3]); + else if (umoven(tcp, tcp->u_arg[3], sizeof(struct dqblk), + (char *) &dq) < 0) + tprintf("???"); + else { + tprintf("{"); +- tprintf("%u, ", dq.dqb_bhardlimit); +- tprintf("%u, ", dq.dqb_bsoftlimit); +- tprintf("%u, ", dq.dqb_curblocks); +- tprintf("%u, ", dq.dqb_ihardlimit); +- tprintf("%u, ", dq.dqb_isoftlimit); +- tprintf("%u, ", dq.dqb_curinodes); +- tprintf("%lu, ", dq.dqb_btime); +- tprintf("%lu", dq.dqb_itime); ++ tprintf("%llu, ", (unsigned long long) dq.dqb_bhardlimit); ++ tprintf("%llu, ", (unsigned long long) dq.dqb_bsoftlimit); ++#ifdef HAVE_STRUCT_DQBLK_DQB_CURBLOCKS ++ tprintf("%llu, ", (unsigned long long) dq.dqb_curblocks); ++#else ++ tprintf("%llu, ", (unsigned long long) dq.dqb_curspace); ++#endif ++ tprintf("%llu, ", (unsigned long long) dq.dqb_ihardlimit); ++ tprintf("%llu, ", (unsigned long long) dq.dqb_isoftlimit); ++ tprintf("%llu, ", (unsigned long long) dq.dqb_curinodes); ++ tprintf("%llu, ", (unsigned long long) dq.dqb_btime); ++ tprintf("%llu", (unsigned long long) dq.dqb_itime); + tprintf("}"); + } + diff --git a/dev-util/strace/files/strace-4.5.12-superh-update.patch b/dev-util/strace/files/strace-4.5.12-superh-update.patch new file mode 100644 index 0000000..d402997 --- /dev/null +++ b/dev-util/strace/files/strace-4.5.12-superh-update.patch @@ -0,0 +1,24 @@ +Fix configure script to work with targets like 'sh4-unknown-linux-gnu' + +--- configure.ac ++++ configure.ac +@@ -91,14 +91,14 @@ + arch=hppa + AC_DEFINE([HPPA], 1, [Define for the HPPA architecture.]) + ;; +-sh) +- arch=sh +- AC_DEFINE([SH], 1, [Define for the SH architecture.]) +- ;; +-sh64) ++sh64*) + arch=sh64 + AC_DEFINE([SH64], 1, [Define for the SH64 architecture.]) + ;; ++sh*) ++ arch=sh ++ AC_DEFINE([SH], 1, [Define for the SH architecture.]) ++ ;; + x86?64*) + arch=x86_64 + AC_DEFINE([X86_64], 1, [Define for the AMD x86-64 architecture.]) diff --git a/dev-util/strace/files/strace-4.5.14-CTL_PROC.patch b/dev-util/strace/files/strace-4.5.14-CTL_PROC.patch new file mode 100644 index 0000000..f172917 --- /dev/null +++ b/dev-util/strace/files/strace-4.5.14-CTL_PROC.patch @@ -0,0 +1,17 @@ +fix building with 2.6.18+ headers + +http://bugs.gentoo.org/150907 + +--- strace-4.5.14/system.c ++++ strace-4.5.14/system.c +@@ -1591,6 +1591,10 @@ + #endif + + #ifdef LINUX ++/* linux-2.6.18+ has dropped this enum */ ++#ifndef CTL_PROC ++# define CTL_PROC 4 ++#endif + static const struct xlat sysctl_root[] = { + { CTL_KERN, "CTL_KERN" }, + { CTL_VM, "CTL_VM" }, diff --git a/dev-util/strace/files/strace-4.5.14-PT_GETSIGINFO.patch b/dev-util/strace/files/strace-4.5.14-PT_GETSIGINFO.patch new file mode 100644 index 0000000..3e2ba7e --- /dev/null +++ b/dev-util/strace/files/strace-4.5.14-PT_GETSIGINFO.patch @@ -0,0 +1,18 @@ +strace assumes that if PT_GETSIGINFO is defined, you're building for ia64 as +this was the only architecture that exported PT_GETSIGINFO via glibc userspace +headers. with newer glibc's, support for PT_GETSIGINFO has been added to all +linux architectures so we can no longer assume PT_GETSIGINFO == ia64. + +http://bugs.gentoo.org/149945 + +--- strace.c 11 Oct 2006 22:55:25 -0000 1.71 ++++ strace.c 11 Oct 2006 23:11:44 -0000 1.72 +@@ -2261,7 +2261,7 @@ Process %d attached (waiting for parent) + if (!cflag + && (qual_flags[WSTOPSIG(status)] & QUAL_SIGNAL)) { + unsigned long addr = 0, pc = 0; +-#ifdef PT_GETSIGINFO ++#if defined(PT_CR_IPSR) && defined(PT_CR_IIP) && defined(PT_GETSIGINFO) + # define PSR_RI 41 + struct siginfo si; + unsigned long psr; diff --git a/dev-util/strace/files/strace-4.5.15-mips-sigcontext.patch b/dev-util/strace/files/strace-4.5.15-mips-sigcontext.patch new file mode 100644 index 0000000..7917a1e --- /dev/null +++ b/dev-util/strace/files/strace-4.5.15-mips-sigcontext.patch @@ -0,0 +1,22 @@ +--- signal.c.orig ++++ signal.c +@@ -67,6 +67,7 @@ + + #ifdef LINUX + ++#include <linux/version.h> + #ifdef IA64 + # include <asm/ptrace_offsets.h> + #endif /* !IA64 */ +@@ -1435,7 +1436,11 @@ + if (umove(tcp, sp, &sc) < 0) + return 0; + tcp->u_arg[0] = 1; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) + tcp->u_arg[1] = sc.sc_sigset; ++#else ++ tcp->u_arg[1] = sc.sc_hi2; ++#endif + } else { + tcp->u_rval = tcp->u_error = 0; + if(tcp->u_arg[0] == 0) diff --git a/dev-util/strace/files/strace-4.5.15-mips-sprintsigmask.patch b/dev-util/strace/files/strace-4.5.15-mips-sprintsigmask.patch new file mode 100644 index 0000000..2f7c2ac --- /dev/null +++ b/dev-util/strace/files/strace-4.5.15-mips-sprintsigmask.patch @@ -0,0 +1,13 @@ +local sprintsigmask() now takes three args rather than two + +--- signal.c ++++ signal.c +@@ -1440,7 +1440,7 @@ struct tcb *tcp; + tcp->u_rval = tcp->u_error = 0; + if(tcp->u_arg[0] == 0) + return 0; +- tcp->auxstr = sprintsigmask("mask now ", tcp->u_arg[1]); ++ tcp->auxstr = sprintsigmask("mask now ", tcp->u_arg[1], 0); + return RVAL_NONE | RVAL_STR; + } + return 0; diff --git a/dev-util/strace/files/strace-4.5.8-ia64.patch b/dev-util/strace/files/strace-4.5.8-ia64.patch new file mode 100644 index 0000000..922f62c --- /dev/null +++ b/dev-util/strace/files/strace-4.5.8-ia64.patch @@ -0,0 +1,97 @@ +Remove some obsolete ia64-related hacks from the strace source +08 Feb 2005 agriffis@gentoo.org + +--- strace-4.5.8/process.c ++++ strace-4.5.8/process.c +@@ -82,14 +82,10 @@ + + #ifdef HAVE_LINUX_PTRACE_H + #undef PTRACE_SYSCALL +-# ifdef HAVE_STRUCT_IA64_FPREG +-# define ia64_fpreg XXX_ia64_fpreg +-# endif + # ifdef HAVE_STRUCT_PT_ALL_USER_REGS + # define pt_all_user_regs XXX_pt_all_user_regs + # endif + #include <linux/ptrace.h> +-# undef ia64_fpreg + # undef pt_all_user_regs + #endif + +--- strace-4.5.8/signal.c ++++ strace-4.5.8/signal.c +@@ -53,14 +53,10 @@ + #endif + #elif defined(HAVE_LINUX_PTRACE_H) + #undef PTRACE_SYSCALL +-# ifdef HAVE_STRUCT_IA64_FPREG +-# define ia64_fpreg XXX_ia64_fpreg +-# endif + # ifdef HAVE_STRUCT_PT_ALL_USER_REGS + # define pt_all_user_regs XXX_pt_all_user_regs + # endif + #include <linux/ptrace.h> +-# undef ia64_fpreg + # undef pt_all_user_regs + #endif + +--- strace-4.5.8/syscall.c ++++ strace-4.5.8/syscall.c +@@ -63,14 +63,10 @@ + #endif + #elif defined(HAVE_LINUX_PTRACE_H) + #undef PTRACE_SYSCALL +-# ifdef HAVE_STRUCT_IA64_FPREG +-# define ia64_fpreg XXX_ia64_fpreg +-# endif + # ifdef HAVE_STRUCT_PT_ALL_USER_REGS + # define pt_all_user_regs XXX_pt_all_user_regs + # endif + #include <linux/ptrace.h> +-# undef ia64_fpreg + # undef pt_all_user_regs + #endif + +--- strace-4.5.8/system.c ++++ strace-4.5.8/system.c +@@ -32,6 +32,23 @@ + + #include "defs.h" + ++#ifdef HAVE_SYS_REG_H ++# include <sys/reg.h> ++# ifndef PTRACE_PEEKUSR ++# define PTRACE_PEEKUSR PTRACE_PEEKUSER ++# endif ++# ifndef PTRACE_POKEUSR ++# define PTRACE_POKEUSR PTRACE_POKEUSER ++# endif ++#elif defined(HAVE_LINUX_PTRACE_H) ++# undef PTRACE_SYSCALL ++# ifdef HAVE_STRUCT_PT_ALL_USER_REGS ++# define pt_all_user_regs XXX_pt_all_user_regs ++# endif ++# include <linux/ptrace.h> ++# undef pt_all_user_regs ++#endif ++ + #ifdef LINUX + #define _LINUX_SOCKET_H + #define _LINUX_FS_H +--- strace-4.5.8/util.c ++++ strace-4.5.8/util.c +@@ -63,14 +63,10 @@ + # define PTRACE_PEEKUSR PTRACE_PEEKUSER + #elif defined(HAVE_LINUX_PTRACE_H) + #undef PTRACE_SYSCALL +-# ifdef HAVE_STRUCT_IA64_FPREG +-# define ia64_fpreg XXX_ia64_fpreg +-# endif + # ifdef HAVE_STRUCT_PT_ALL_USER_REGS + # define pt_all_user_regs XXX_pt_all_user_regs + # endif + #include <linux/ptrace.h> +-# undef ia64_fpreg + # undef pt_all_user_regs + #endif + diff --git a/dev-util/strace/files/strace-dont-use-REG_SYSCALL-for-sh.patch b/dev-util/strace/files/strace-dont-use-REG_SYSCALL-for-sh.patch new file mode 100644 index 0000000..9030ecc --- /dev/null +++ b/dev-util/strace/files/strace-dont-use-REG_SYSCALL-for-sh.patch @@ -0,0 +1,10 @@ +--- strace/process.c ++++ strace/process.c +@@ -2663,7 +2663,6 @@ const struct xlat struct_user_offsets[] + { 4*REG_GBR, "4*REG_GBR" }, + { 4*REG_MACH, "4*REG_MACH" }, + { 4*REG_MACL, "4*REG_MACL" }, +- { 4*REG_SYSCALL, "4*REG_SYSCALL" }, + { 4*REG_FPUL, "4*REG_FPUL" }, + { 4*REG_FPREG0, "4*REG_FPREG0" }, + { 4*(REG_FPREG0+1), "4*REG_FPREG1" }, diff --git a/dev-util/strace/files/strace-fix-arm-bad-syscall.patch b/dev-util/strace/files/strace-fix-arm-bad-syscall.patch new file mode 100644 index 0000000..125440d --- /dev/null +++ b/dev-util/strace/files/strace-fix-arm-bad-syscall.patch @@ -0,0 +1,20 @@ +http://www.fluff.org/ben/patches/strace/ + +--- strace-4.5.12-orig/syscall.c 2005-06-08 21:45:28.000000000 +0100 ++++ strace-4.5.12/syscall.c 2005-10-25 19:26:39.000000000 +0100 +@@ -1013,6 +1013,15 @@ struct tcb *tcp; + /* + * Note: we only deal with only 32-bit CPUs here. + */ ++ ++ if (!(tcp->flags & TCB_INSYSCALL) && ++ (tcp->flags & TCB_WAITEXECVE)) { ++ /* caught a fake syscall from the execve's exit */ ++ tcp->flags &= ~TCB_WAITEXECVE; ++ return 0; ++ } ++ ++ + if (regs.ARM_cpsr & 0x20) { + /* + * Get the Thumb-mode system call number diff --git a/dev-util/strace/files/strace-superh-update.patch b/dev-util/strace/files/strace-superh-update.patch new file mode 100644 index 0000000..ff865a2 --- /dev/null +++ b/dev-util/strace/files/strace-superh-update.patch @@ -0,0 +1,28 @@ +--- strace/configure ++++ strace/configure +@@ -1993,19 +1993,19 @@ + _ACEOF + + ;; +-sh) +- arch=sh ++sh64) ++ arch=sh64 + + cat >>confdefs.h <<\_ACEOF +-#define SH 1 ++#define SH64 1 + _ACEOF + + ;; +-sh64) +- arch=sh64 ++sh*) ++ arch=sh + + cat >>confdefs.h <<\_ACEOF +-#define SH64 1 ++#define SH 1 + _ACEOF + + ;; diff --git a/dev-util/strace/files/strace-undef-syscall.patch b/dev-util/strace/files/strace-undef-syscall.patch new file mode 100644 index 0000000..410e499 --- /dev/null +++ b/dev-util/strace/files/strace-undef-syscall.patch @@ -0,0 +1,15 @@ +--- strace-4.5.12/linux/syscallent.h.orig 2005-08-09 01:48:54.000000000 -0600 ++++ strace-4.5.12/linux/syscallent.h 2005-08-09 01:50:23.000000000 -0600 +@@ -298,7 +298,11 @@ + { 3, 0, sys_io_cancel, "io_cancel" }, /* 249 */ + { 5, TF, sys_fadvise64, "fadvise64" }, /* 250 */ + { 5, 0, printargs, "SYS_251" }, /* 251 */ +- { 1, TP, sys_exit, "exit_group", __NR_exit_group }, /* 252 */ ++ { 1, TP, sys_exit, "exit_group" ++#ifdef __NR_exit_group ++ , __NR_exit_group ++#endif ++ }, /* 252 */ + { 4, 0, printargs, "lookup_dcookie"}, /* 253 */ + { 1, 0, sys_epoll_create, "epoll_create" }, /* 254 */ + { 4, 0, sys_epoll_ctl, "epoll_ctl" }, /* 255 */ |