forked from pool/strace
This commit is contained in:
parent
e0409e9ec2
commit
c23a8ee63b
30
madvice.diff
30
madvice.diff
@ -1,30 +0,0 @@
|
|||||||
diff -urN strace-4.5.17.orig/mem.c strace-4.5.17/mem.c
|
|
||||||
--- strace-4.5.17.orig/mem.c 2008-05-20 06:41:56.000000000 +0530
|
|
||||||
+++ strace-4.5.17/mem.c 2008-07-30 23:06:51.325115690 +0530
|
|
||||||
@@ -388,7 +388,7 @@
|
|
||||||
#ifdef MADV_NORMAL
|
|
||||||
{ MADV_NORMAL, "MADV_NORMAL" },
|
|
||||||
#endif
|
|
||||||
-#ifdef MADZV_RANDOM
|
|
||||||
+#ifdef MADV_RANDOM
|
|
||||||
{ MADV_RANDOM, "MADV_RANDOM" },
|
|
||||||
#endif
|
|
||||||
#ifdef MADV_SEQUENTIAL
|
|
||||||
@@ -397,7 +397,7 @@
|
|
||||||
#ifdef MADV_WILLNEED
|
|
||||||
{ MADV_WILLNEED, "MADV_WILLNEED" },
|
|
||||||
#endif
|
|
||||||
-#ifdef MADV_DONTNED
|
|
||||||
+#ifdef MADV_DONTNEED
|
|
||||||
{ MADV_DONTNEED, "MADV_DONTNEED" },
|
|
||||||
#endif
|
|
||||||
{ 0, NULL },
|
|
||||||
@@ -410,7 +410,7 @@
|
|
||||||
{
|
|
||||||
if (entering(tcp)) {
|
|
||||||
tprintf("%#lx, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
|
|
||||||
- printflags(madvise_flags, tcp->u_arg[2], "MADV_???");
|
|
||||||
+ printxval(madvise_flags, tcp->u_arg[2], "MADV_???");
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:9ba497b368fe08982bd6d03dbfa4d942ee1b2438e641ea754b682bd5b7536c9d
|
|
||||||
size 478548
|
|
@ -1,13 +1,15 @@
|
|||||||
--- process.c
|
--- process.c
|
||||||
+++ process.c
|
+++ process.c
|
||||||
@@ -765,12 +765,12 @@ setarg(tcp, argnum)
|
@@ -765,12 +765,13 @@ setarg(tcp, argnum)
|
||||||
{
|
{
|
||||||
#if defined (IA64)
|
#if defined (IA64)
|
||||||
{
|
{
|
||||||
- unsigned long *bsp, *ap;
|
- unsigned long *bsp, *ap;
|
||||||
+ unsigned long bsp, *ap;
|
+ unsigned long *ap;
|
||||||
|
+ long bsp;
|
||||||
|
|
||||||
if (upeek(tcp->pid, PT_AR_BSP, (long *) &bsp) , 0)
|
- if (upeek(tcp->pid, PT_AR_BSP, (long *) &bsp) , 0)
|
||||||
|
+ if (upeek(tcp->pid, PT_AR_BSP, &bsp) , 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
- ap = ia64_rse_skip_regs(bsp, argnum);
|
- ap = ia64_rse_skip_regs(bsp, argnum);
|
||||||
@ -15,7 +17,7 @@
|
|||||||
errno = 0;
|
errno = 0;
|
||||||
ptrace(PTRACE_POKEDATA, tcp->pid, (char *) ap, tcp->u_arg[argnum]);
|
ptrace(PTRACE_POKEDATA, tcp->pid, (char *) ap, tcp->u_arg[argnum]);
|
||||||
if (errno)
|
if (errno)
|
||||||
@@ -2289,6 +2289,18 @@ static const struct xlat ptrace_cmds[] =
|
@@ -2289,6 +2290,18 @@ static const struct xlat ptrace_cmds[] =
|
||||||
#ifdef PTRACE_SETVRREGS
|
#ifdef PTRACE_SETVRREGS
|
||||||
{ PTRACE_SETVRREGS, "PTRACE_SETVRREGS", },
|
{ PTRACE_SETVRREGS, "PTRACE_SETVRREGS", },
|
||||||
#endif
|
#endif
|
||||||
@ -61,45 +63,16 @@
|
|||||||
return if $result == 0;
|
return if $result == 0;
|
||||||
|
|
||||||
my $seq = $pr{$pid}{seq};
|
my $seq = $pr{$pid}{seq};
|
||||||
--- syscall.c
|
|
||||||
+++ syscall.c
|
|
||||||
@@ -1963,7 +1963,7 @@ struct tcb *tcp;
|
|
||||||
#elif defined (IA64)
|
|
||||||
{
|
|
||||||
if (!ia32) {
|
|
||||||
- unsigned long *out0, *rbs_end, cfm, sof, sol, i;
|
|
||||||
+ unsigned long *out0, rbs_end, cfm, sof, sol, i;
|
|
||||||
/* be backwards compatible with kernel < 2.4.4... */
|
|
||||||
# ifndef PT_RBS_END
|
|
||||||
# define PT_RBS_END PT_AR_BSP
|
|
||||||
@@ -1976,7 +1976,7 @@ struct tcb *tcp;
|
|
||||||
|
|
||||||
sof = (cfm >> 0) & 0x7f;
|
|
||||||
sol = (cfm >> 7) & 0x7f;
|
|
||||||
- out0 = ia64_rse_skip_regs(rbs_end, -sof + sol);
|
|
||||||
+ out0 = ia64_rse_skip_regs((unsigned long *)rbs_end, -sof + sol);
|
|
||||||
|
|
||||||
if (tcp->scno >= 0 && tcp->scno < nsyscalls
|
|
||||||
&& sysent[tcp->scno].nargs != -1)
|
|
||||||
--- util.c
|
--- util.c
|
||||||
+++ util.c
|
+++ util.c
|
||||||
@@ -1300,7 +1300,7 @@ typedef unsigned long *arg_setup_state;
|
@@ -1319,9 +1319,8 @@ arg_setup(struct tcb *tcp, arg_setup_sta
|
||||||
static int
|
|
||||||
arg_setup(struct tcb *tcp, arg_setup_state *state)
|
|
||||||
{
|
|
||||||
- unsigned long *bsp, cfm, sof, sol;
|
|
||||||
+ unsigned long bsp, cfm, sof, sol;
|
|
||||||
|
|
||||||
if (ia32)
|
|
||||||
return 0;
|
|
||||||
@@ -1312,9 +1312,8 @@ arg_setup(struct tcb *tcp, arg_setup_sta
|
|
||||||
|
|
||||||
sof = (cfm >> 0) & 0x7f;
|
sof = (cfm >> 0) & 0x7f;
|
||||||
sol = (cfm >> 7) & 0x7f;
|
sol = (cfm >> 7) & 0x7f;
|
||||||
- bsp = ia64_rse_skip_regs(bsp, -sof + sol);
|
- bsp = (long) ia64_rse_skip_regs((unsigned long *) bsp, -sof + sol);
|
||||||
+ *state = ia64_rse_skip_regs((unsigned long *) bsp, -sof + sol);
|
+ *state = ia64_rse_skip_regs((unsigned long *) bsp, -sof + sol);
|
||||||
|
|
||||||
- *state = bsp;
|
- *state = (unsigned long *) bsp;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
3
strace-4.5.18.tar.bz2
Normal file
3
strace-4.5.18.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:95e7b7470e04f22c3ec8dc6d0b1fdd8944306cb5313c84c4545cd83abada26d0
|
||||||
|
size 480973
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Sep 2 10:23:32 CEST 2008 - schwab@suse.de
|
||||||
|
|
||||||
|
- Update to strace 4.5.18.
|
||||||
|
* Bug fixes.
|
||||||
|
* Support new Linux/PPC system call subpage_prot and PROT_SAO flag.
|
||||||
|
* In sigaction system call, display sa_flags value along with
|
||||||
|
SIG_DFL/SIG_IGN.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Aug 12 16:30:43 CEST 2008 - schwab@suse.de
|
Tue Aug 12 16:30:43 CEST 2008 - schwab@suse.de
|
||||||
|
|
||||||
@ -11,7 +20,7 @@ Tue Aug 5 15:09:10 CEST 2008 - schwab@suse.de
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jul 22 09:47:31 CEST 2008 - schwab@suse.de
|
Tue Jul 22 09:47:31 CEST 2008 - schwab@suse.de
|
||||||
|
|
||||||
- Update to strace 4.5.16.
|
- Update to strace 4.5.17.
|
||||||
* Many bug fixes.
|
* Many bug fixes.
|
||||||
* -F is now deprecated, -f has traced vfork too on Linux for a long time
|
* -F is now deprecated, -f has traced vfork too on Linux for a long time
|
||||||
now.
|
now.
|
||||||
|
20
strace.spec
20
strace.spec
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package strace (Version 4.5.17)
|
# spec file for package strace (Version 4.5.18)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
@ -22,13 +22,11 @@ BuildRequires: libacl-devel
|
|||||||
License: BSD 3-Clause
|
License: BSD 3-Clause
|
||||||
Group: Development/Tools/Debuggers
|
Group: Development/Tools/Debuggers
|
||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
Version: 4.5.17
|
Version: 4.5.18
|
||||||
Release: 13
|
Release: 1
|
||||||
Summary: A utility to trace the system calls of a program
|
Summary: A utility to trace the system calls of a program
|
||||||
Source: strace-%{version}.tar.bz2
|
Source: http://dl.sourceforge.net/strace/strace-%{version}.tar.bz2
|
||||||
Patch: strace-%{version}.diff
|
Patch: strace-%{version}.diff
|
||||||
Patch1: vfork.diff
|
|
||||||
Patch2: madvice.diff
|
|
||||||
Url: http://sourceforge.net/projects/strace/
|
Url: http://sourceforge.net/projects/strace/
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
@ -48,8 +46,6 @@ Authors:
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch
|
%patch
|
||||||
%patch1
|
|
||||||
%patch2 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="$RPM_OPT_FLAGS"
|
export CFLAGS="$RPM_OPT_FLAGS"
|
||||||
@ -73,12 +69,18 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%doc %{_mandir}/man1/strace.1.gz
|
%doc %{_mandir}/man1/strace.1.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 02 2008 schwab@suse.de
|
||||||
|
- Update to strace 4.5.18.
|
||||||
|
* Bug fixes.
|
||||||
|
* Support new Linux/PPC system call subpage_prot and PROT_SAO flag.
|
||||||
|
* In sigaction system call, display sa_flags value along with
|
||||||
|
SIG_DFL/SIG_IGN.
|
||||||
* Tue Aug 12 2008 schwab@suse.de
|
* Tue Aug 12 2008 schwab@suse.de
|
||||||
- Add fix for madvice decoding.
|
- Add fix for madvice decoding.
|
||||||
* Tue Aug 05 2008 schwab@suse.de
|
* Tue Aug 05 2008 schwab@suse.de
|
||||||
- Add fix for vfork handling.
|
- Add fix for vfork handling.
|
||||||
* Tue Jul 22 2008 schwab@suse.de
|
* Tue Jul 22 2008 schwab@suse.de
|
||||||
- Update to strace 4.5.16.
|
- Update to strace 4.5.17.
|
||||||
* Many bug fixes.
|
* Many bug fixes.
|
||||||
* -F is now deprecated, -f has traced vfork too on Linux for a long time
|
* -F is now deprecated, -f has traced vfork too on Linux for a long time
|
||||||
now.
|
now.
|
||||||
|
109
vfork.diff
109
vfork.diff
@ -1,109 +0,0 @@
|
|||||||
From nobody Tue Aug 5 14:41:39 2008
|
|
||||||
From: Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
Subject: [patch] ia64 vfork() fix #2
|
|
||||||
To: strace-devel@lists.sourceforge.net
|
|
||||||
Date: Tue, 5 Aug 2008 13:51:18 +0200
|
|
||||||
|
|
||||||
|
|
||||||
--gatW/ieO32f1wygP
|
|
||||||
Content-Type: text/plain; charset=us-ascii
|
|
||||||
Content-Disposition: inline
|
|
||||||
|
|
||||||
Hi,
|
|
||||||
|
|
||||||
the original fix of a hang of vfork() tracing with -f was posted here:
|
|
||||||
http://sourceforge.net/mailarchive/message.php?msg_name=20080630132558.GA4346%40host0.dyn.jankratochvil.net
|
|
||||||
|
|
||||||
Unfortunately it did convert vfork() into (+/-) pthread_create() instead of
|
|
||||||
intended fork(). It brought no regressions but the fix was incomplete as
|
|
||||||
there was a race possibly causing a crash when the child waited too long:
|
|
||||||
|
|
||||||
clone(Process 944 attached (waiting for parent)
|
|
||||||
Process 944 resumed (parent 942 ready)
|
|
||||||
child_stack=0, flags=CLONE_VM|CLONE_VFORK|SIGCHLD) = 944
|
|
||||||
[pid 942] exit_group(0) = ?
|
|
||||||
--- SIGSEGV (Segmentation fault) @ 200000000010ccb1 (58) ---
|
|
||||||
Process 944 detached
|
|
||||||
|
|
||||||
Fixed by this patch. I hope the fix commit is OK when the original patch was
|
|
||||||
already accepted.
|
|
||||||
|
|
||||||
|
|
||||||
Sorry,
|
|
||||||
Jan
|
|
||||||
|
|
||||||
--gatW/ieO32f1wygP
|
|
||||||
Content-Type: text/plain; charset=us-ascii
|
|
||||||
Content-Disposition: inline; filename="strace-4.5.16-ia64-vfork-vm.patch"
|
|
||||||
|
|
||||||
2008-08-05 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
||||||
|
|
||||||
* util.c (CLONE_VM): Define if not defined already.
|
|
||||||
(setbpt): Clear CLONE_VM in the case we already clear CLONE_VFORK for
|
|
||||||
SYS_clone and SYS_clone2.
|
|
||||||
Reported by Michal Nowak.
|
|
||||||
Fixes RH#455078.
|
|
||||||
|
|
||||||
--- util.c 18 Jul 2008 01:19:36 -0000 1.77
|
|
||||||
+++ util.c 5 Aug 2008 08:54:14 -0000
|
|
||||||
@@ -1284,6 +1284,9 @@ struct tcb *tcp;
|
|
||||||
#ifndef CLONE_VFORK
|
|
||||||
# define CLONE_VFORK 0x00004000
|
|
||||||
#endif
|
|
||||||
+#ifndef CLONE_VM
|
|
||||||
+# define CLONE_VM 0x00000100
|
|
||||||
+#endif
|
|
||||||
#ifndef CLONE_STOPPED
|
|
||||||
# define CLONE_STOPPED 0x02000000
|
|
||||||
#endif
|
|
||||||
@@ -1533,15 +1536,19 @@ struct tcb *tcp;
|
|
||||||
#ifdef SYS_clone2
|
|
||||||
case SYS_clone2:
|
|
||||||
#endif
|
|
||||||
- /* ia64 calls directly `clone (CLONE_VFORK)' contrary to
|
|
||||||
- x86 SYS_vfork above. Even on x86 we turn the vfork
|
|
||||||
- semantics into plain fork - each application must not
|
|
||||||
- depend on the vfork specifics according to POSIX. We
|
|
||||||
- would hang waiting for the parent resume otherwise. */
|
|
||||||
+ /* ia64 calls directly `clone (CLONE_VFORK | CLONE_VM)'
|
|
||||||
+ contrary to x86 SYS_vfork above. Even on x86 we turn the
|
|
||||||
+ vfork semantics into plain fork - each application must not
|
|
||||||
+ depend on the vfork specifics according to POSIX. We would
|
|
||||||
+ hang waiting for the parent resume otherwise. We need to
|
|
||||||
+ clear also CLONE_VM but only in the CLONE_VFORK case as
|
|
||||||
+ otherwise we would break pthread_create. */
|
|
||||||
+
|
|
||||||
if ((arg_setup (tcp, &state) < 0
|
|
||||||
|| set_arg0 (tcp, &state,
|
|
||||||
(tcp->u_arg[arg0_index] | CLONE_PTRACE)
|
|
||||||
- & ~CLONE_VFORK) < 0
|
|
||||||
+ & ~(tcp->u_arg[arg0_index] & CLONE_VFORK
|
|
||||||
+ ? CLONE_VFORK | CLONE_VM : 0)) < 0
|
|
||||||
|| arg_finish_change (tcp, &state) < 0))
|
|
||||||
return -1;
|
|
||||||
tcp->flags |= TCB_BPTSET;
|
|
||||||
|
|
||||||
--gatW/ieO32f1wygP
|
|
||||||
Content-Type: text/plain; charset="us-ascii"
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Transfer-Encoding: 7bit
|
|
||||||
Content-Disposition: inline
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------
|
|
||||||
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
|
|
||||||
Build the coolest Linux based applications with Moblin SDK & win great prizes
|
|
||||||
Grand prize is a trip for two to an Open Source event anywhere in the world
|
|
||||||
http://moblin-contest.org/redirect.php?banner_id=100&url=/
|
|
||||||
--gatW/ieO32f1wygP
|
|
||||||
Content-Type: text/plain; charset="us-ascii"
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Transfer-Encoding: 7bit
|
|
||||||
Content-Disposition: inline
|
|
||||||
|
|
||||||
_______________________________________________
|
|
||||||
Strace-devel mailing list
|
|
||||||
Strace-devel@lists.sourceforge.net
|
|
||||||
https://lists.sourceforge.net/lists/listinfo/strace-devel
|
|
||||||
|
|
||||||
--gatW/ieO32f1wygP--
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user