forked from pool/strace
- updated to 4.7
* Changes in behavior * strace no longer suspends waitpid until there is a child for waitpid'ing process to collect status from. * strace no longer detaches from a tracee which is supposed to be going to die. * strace now issues a new message: "+++ exited with EXITCODE +++" which shows exact moment strace got exit notification, analogous to existing "+++ killed by SIG +++" message. * Improvements * Added x32 personality support (x86_64 architecture). * Added -y and -P options to print file descriptor paths and filter by those paths. * Added -I option to control strace interactivity. * Allowed -p option to take comma or whitespace-separated list of PIDs. * Added strace_log_merge script helper to merge timestamped "strace -ff" log files. * Implemented decoding of clock_adjtime, get_robust_list, migrate_pages, preadv, prlimit64, process_vm_readv, process_vm_writev, pwritev, recvmmsg, recvmsg, rt_tgsigqueueinfo, sendmmsg, setns, set_robust_list, sched_rr_get_interval, splice, syslog, tee and vmsplice syscalls. * Enhanced decoding of capget, capset, getrlimit, flistxattr, io_submit, listxattr, setrlimit and swapon syscalls. * Implemented decoding of loop and mtd ioctls. * Added syscall entries for new linux syscalls. * Added syscall entries for direct socket system calls on powerpc. * Updated the list of errno constants. * Updated lists of MSG_*, STA_*, and TCP_* constants. * Regenerated the list of ioctl names from Linux 3.3. OBS-URL: https://build.opensuse.org/package/show/devel:tools/strace?expand=0&rev=22
This commit is contained in:
parent
cbd65855d1
commit
91ceee2a57
@ -1,126 +0,0 @@
|
|||||||
commit c614b5785876c46cb15fd3f340f739926e913859
|
|
||||||
Author: Andi Kleen <ak@linux.intel.com>
|
|
||||||
Date: Wed Apr 6 15:12:41 2011 -0700
|
|
||||||
|
|
||||||
Fix io_submit decoding in strace
|
|
||||||
|
|
||||||
strace didn't decode important fields in the iocb passed to io_submit.
|
|
||||||
This patch changes the code to dump them all. Also I prefixed the fields
|
|
||||||
with names to make it easier to read.
|
|
||||||
|
|
||||||
diff --git a/desc.c b/desc.c
|
|
||||||
index 2b9f30a..57dc755 100644
|
|
||||||
--- a/desc.c
|
|
||||||
+++ b/desc.c
|
|
||||||
@@ -806,6 +806,51 @@ sys_io_destroy(struct tcb *tcp)
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
+#define ARRAY_SIZE(x) (sizeof(x)/sizeof(*(x)))
|
|
||||||
+
|
|
||||||
+enum iocb_sub {
|
|
||||||
+ SUB_NONE, SUB_COMMON, SUB_POLL, SUB_VECTOR
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+static const char *
|
|
||||||
+iocb_cmd_lookup(unsigned cmd, enum iocb_sub *sub)
|
|
||||||
+{
|
|
||||||
+ static char buf[20];
|
|
||||||
+ static struct {
|
|
||||||
+ const char *name;
|
|
||||||
+ enum iocb_sub sub;
|
|
||||||
+ } cmds[] = {
|
|
||||||
+ { "pread", SUB_COMMON },
|
|
||||||
+ { "pwrite", SUB_COMMON },
|
|
||||||
+ { "fsync", SUB_NONE },
|
|
||||||
+ { "fdsync", SUB_NONE },
|
|
||||||
+ { "op4", SUB_NONE },
|
|
||||||
+ { "poll", SUB_POLL },
|
|
||||||
+ { "noop", SUB_NONE },
|
|
||||||
+ { "preadv", SUB_VECTOR },
|
|
||||||
+ { "pwritev", SUB_VECTOR },
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ if (cmd < ARRAY_SIZE(cmds)) {
|
|
||||||
+ *sub = cmds[cmd].sub;
|
|
||||||
+ return cmds[cmd].name;
|
|
||||||
+ }
|
|
||||||
+ *sub = SUB_NONE;
|
|
||||||
+ snprintf(buf, sizeof buf, "?%u?", cmd);
|
|
||||||
+ return buf;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/* Not defined in libaio.h */
|
|
||||||
+#define IOCB_RESFD (1 << 0)
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+print_common_flags(struct iocb *iocb)
|
|
||||||
+{
|
|
||||||
+ if (iocb->u.c.flags & IOCB_RESFD)
|
|
||||||
+ tprintf("resfd=%d, ", iocb->u.c.resfd);
|
|
||||||
+ if (iocb->u.c.flags & ~IOCB_RESFD)
|
|
||||||
+ tprintf("flags=%x, ", iocb->u.c.flags);
|
|
||||||
+}
|
|
||||||
int
|
|
||||||
sys_io_submit(struct tcb *tcp)
|
|
||||||
{
|
|
||||||
@@ -822,7 +867,9 @@ sys_io_submit(struct tcb *tcp)
|
|
||||||
struct iocb *iocbp, **iocbs = (void *)tcp->u_arg[2];
|
|
||||||
|
|
||||||
for (i = 0; i < nr; i++, iocbs++) {
|
|
||||||
+ enum iocb_sub sub;
|
|
||||||
struct iocb iocb;
|
|
||||||
+ int k;
|
|
||||||
if (i == 0)
|
|
||||||
tprintf("{");
|
|
||||||
else
|
|
||||||
@@ -833,10 +880,45 @@ sys_io_submit(struct tcb *tcp)
|
|
||||||
tprintf("{...}");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
- tprintf("{%p, %u, %hu, %hu, %d}",
|
|
||||||
- iocb.data, iocb.key,
|
|
||||||
- iocb.aio_lio_opcode,
|
|
||||||
- iocb.aio_reqprio, iocb.aio_fildes);
|
|
||||||
+ tprintf("{");
|
|
||||||
+ if (iocb.data)
|
|
||||||
+ tprintf("data:%p, ", iocb.data);
|
|
||||||
+ if (iocb.key)
|
|
||||||
+ tprintf("key:%u, ", iocb.key);
|
|
||||||
+ tprintf("%s, ", iocb_cmd_lookup(iocb.aio_lio_opcode, &sub));
|
|
||||||
+ if (iocb.aio_reqprio)
|
|
||||||
+ tprintf("reqprio:%d, ", iocb.aio_reqprio);
|
|
||||||
+ tprintf("filedes:%d", iocb.aio_fildes);
|
|
||||||
+ switch (sub) {
|
|
||||||
+ case SUB_COMMON:
|
|
||||||
+ tprintf(", buf:%p, nbytes:%lu, offset:%llx",
|
|
||||||
+ iocb.u.c.buf,
|
|
||||||
+ iocb.u.c.nbytes,
|
|
||||||
+ iocb.u.c.offset);
|
|
||||||
+ print_common_flags(&iocb);
|
|
||||||
+ break;
|
|
||||||
+ case SUB_VECTOR:
|
|
||||||
+ tprintf(", %llx, ", iocb.u.v.offset);
|
|
||||||
+ print_common_flags(&iocb);
|
|
||||||
+ for (k = 0; k < iocb.u.v.nr; k++) {
|
|
||||||
+ struct iovec iov;
|
|
||||||
+ tprintf("%s", k == 0 ? "" : ", ");
|
|
||||||
+ if (umove(tcp, (unsigned long)iocb.u.v.vec +
|
|
||||||
+ sizeof(struct iovec)*k, &iov))
|
|
||||||
+ tprintf("{...}");
|
|
||||||
+ else
|
|
||||||
+ tprintf("{ %p, %lu }",
|
|
||||||
+ iov.iov_base,
|
|
||||||
+ iov.iov_len);
|
|
||||||
+ }
|
|
||||||
+ break;
|
|
||||||
+ case SUB_POLL:
|
|
||||||
+ tprintf(", %x", iocb.u.poll.events);
|
|
||||||
+ break;
|
|
||||||
+ case SUB_NONE:
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ tprintf("}");
|
|
||||||
}
|
|
||||||
if (i)
|
|
||||||
tprintf("}");
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:52f6044d92558594b1567778951e93a3bc9913edc4a1a4c34fda6a9a85af3c9b
|
|
||||||
size 489582
|
|
3
strace-4.7.tar.xz
Normal file
3
strace-4.7.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:c49cd98873c119c5f201356200a9b9687da1ceea83a05047e2ae0a7ac1e41195
|
||||||
|
size 403280
|
@ -1,3 +1,79 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu May 3 12:02:17 CEST 2012 - meissner@suse.de
|
||||||
|
|
||||||
|
- updated to 4.7
|
||||||
|
* Changes in behavior
|
||||||
|
* strace no longer suspends waitpid until there is a child
|
||||||
|
for waitpid'ing process to collect status from.
|
||||||
|
* strace no longer detaches from a tracee which is supposed
|
||||||
|
to be going to die.
|
||||||
|
* strace now issues a new message: "+++ exited with EXITCODE +++"
|
||||||
|
which shows exact moment strace got exit notification,
|
||||||
|
analogous to existing "+++ killed by SIG +++" message.
|
||||||
|
|
||||||
|
* Improvements
|
||||||
|
* Added x32 personality support (x86_64 architecture).
|
||||||
|
* Added -y and -P options to print file descriptor paths and
|
||||||
|
filter by those paths.
|
||||||
|
* Added -I option to control strace interactivity.
|
||||||
|
* Allowed -p option to take comma or whitespace-separated list of PIDs.
|
||||||
|
* Added strace_log_merge script helper to merge timestamped "strace -ff"
|
||||||
|
log files.
|
||||||
|
* Implemented decoding of clock_adjtime, get_robust_list, migrate_pages,
|
||||||
|
preadv, prlimit64, process_vm_readv, process_vm_writev, pwritev,
|
||||||
|
recvmmsg, recvmsg, rt_tgsigqueueinfo, sendmmsg, setns, set_robust_list,
|
||||||
|
sched_rr_get_interval, splice, syslog, tee and vmsplice syscalls.
|
||||||
|
* Enhanced decoding of capget, capset, getrlimit, flistxattr, io_submit,
|
||||||
|
listxattr, setrlimit and swapon syscalls.
|
||||||
|
* Implemented decoding of loop and mtd ioctls.
|
||||||
|
* Added syscall entries for new linux syscalls.
|
||||||
|
* Added syscall entries for direct socket system calls on powerpc.
|
||||||
|
* Updated the list of errno constants.
|
||||||
|
* Updated lists of MSG_*, STA_*, and TCP_* constants.
|
||||||
|
* Regenerated the list of ioctl names from Linux 3.3.
|
||||||
|
* Enhanced switching between processes with different personalities.
|
||||||
|
* Enhanced signals reporting by using short signal names.
|
||||||
|
* Made ERESTART* messages more descriptive.
|
||||||
|
* Made parsing of numbers from strings more robust.
|
||||||
|
* Added support for compat_statfs64 and statfs64.f_flags.
|
||||||
|
* Changed read of data blocks to use single process_vm_readv syscall
|
||||||
|
(when available) instead of several PTRACE_PEEKDATA operations.
|
||||||
|
* Changed read of registers on x86 and x86-64 to use single PTRACE_GETREGS
|
||||||
|
operation instead of several PTRACE_PEEKUSER operations.
|
||||||
|
* Applied various optimizations to make strace work faster.
|
||||||
|
* Bug fixes
|
||||||
|
* Implemented proper handling of real SIGTRAPs on kernels supporting
|
||||||
|
PTRACE_O_TRACESYSGOOD.
|
||||||
|
(Addresses Fedora bug #162774).
|
||||||
|
* Fixed sockaddr_un.sun_path name in decoded output.
|
||||||
|
(Addresses Debian bug #554946).
|
||||||
|
* Fixed to avoid potential core file clobbering on exit.
|
||||||
|
(Addresses Debian bug #656398).
|
||||||
|
* Fixed a typo in documentation.
|
||||||
|
(Addresses Debian bug #653309).
|
||||||
|
* Fixed decoding of timer id returned by timer_create.
|
||||||
|
* Fixed epoll_create1, epoll_wait and epoll_pwait decoding.
|
||||||
|
* Fixed *at syscalls flags decoding.
|
||||||
|
* Fixed ARM EABI 64-bit syscall's arguments decoding.
|
||||||
|
* Fixed semtimedop decoding on s390.
|
||||||
|
* Fixed osf_sigprocmask decoding on alpha.
|
||||||
|
* Fixed ipc and socket subcall decoding on several architectures.
|
||||||
|
* Corrected syscall entries for epoll_pwait, epoll_create, epoll_ctl,
|
||||||
|
epoll_wait, mincore, mlockall, prctl, reboot, sendfile, sendfile64,
|
||||||
|
sendmsg, sgetmask, ssetmask, swapon, tgkill and tkill syscalls.
|
||||||
|
* Corrected io_* syscall entries on ARM.
|
||||||
|
* Fixed PID prefix printing in "strace -oLOG -ff -p1 -p2 -p3" case.
|
||||||
|
* Fixed logging of unfinished lines in "strace -oLOG -ff" case.
|
||||||
|
* Fixed build when libaio-devel is not available.
|
||||||
|
* Fixed configure checks for PTRACE_* constants.
|
||||||
|
* Fixed compilation warnings remained on several architectures.
|
||||||
|
|
||||||
|
* Portability
|
||||||
|
* Removed all non-Linux code. After years of neglect, that dead code
|
||||||
|
just hampered further strace development.
|
||||||
|
* Linux kernel >= 2.6.18 is recommended. Older versions might still
|
||||||
|
work but they haven't been thoroughly tested with this release.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Oct 4 14:44:37 UTC 2011 - tserong@suse.com
|
Tue Oct 4 14:44:37 UTC 2011 - tserong@suse.com
|
||||||
|
|
||||||
|
20
strace.spec
20
strace.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package strace
|
# spec file for package strace
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,24 +16,23 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Name: strace
|
Name: strace
|
||||||
BuildRequires: libacl-devel libaio-devel lksctp-tools-devel
|
BuildRequires: libacl-devel
|
||||||
License: BSD3c
|
BuildRequires: libaio-devel
|
||||||
Group: Development/Tools/Debuggers
|
BuildRequires: lksctp-tools-devel
|
||||||
AutoReqProv: on
|
|
||||||
# bug437293
|
# bug437293
|
||||||
%ifarch ppc64
|
%ifarch ppc64
|
||||||
Obsoletes: strace-64bit
|
Obsoletes: strace-64bit
|
||||||
%endif
|
%endif
|
||||||
#
|
#
|
||||||
Version: 4.6
|
Version: 4.7
|
||||||
Release: 1
|
Release: 0
|
||||||
Summary: A utility to trace the system calls of a program
|
Summary: A utility to trace the system calls of a program
|
||||||
Source: http://dl.sourceforge.net/strace/strace-%{version}.tar.bz2
|
License: BSD-3-Clause
|
||||||
|
Group: Development/Tools/Debuggers
|
||||||
|
Source: http://dl.sourceforge.net/strace/strace-%{version}.tar.xz
|
||||||
Source2: baselibs.conf
|
Source2: baselibs.conf
|
||||||
Patch0: strace-%{version}.diff
|
Patch0: strace-%{version}.diff
|
||||||
Patch1: io-submit-fix.patch
|
|
||||||
Url: http://sourceforge.net/projects/strace/
|
Url: http://sourceforge.net/projects/strace/
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
@ -53,7 +52,6 @@ Authors:
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="$RPM_OPT_FLAGS"
|
export CFLAGS="$RPM_OPT_FLAGS"
|
||||||
|
Loading…
Reference in New Issue
Block a user