trailing whitespace removal, no code changes
This commit is contained in:
parent
06bfe26236
commit
402eeb6d1f
@ -4,7 +4,7 @@ Here are some notes about it :
|
||||
|
||||
- This couldn't have been done without the sources of the truss
|
||||
utility by Sean Eric Fagan, which were of great help.
|
||||
|
||||
|
||||
- The tracing mecanism used by FreeBD is a lot like the SVR4 one, so
|
||||
this port shares a lot of code with the SVR4 port, including the
|
||||
akward event loop when tracing multiple processes.
|
||||
@ -15,12 +15,12 @@ Here are some notes about it :
|
||||
|
||||
- Tracing linux binaries is not supported yet, but should be possible
|
||||
with some work.
|
||||
|
||||
|
||||
- There are some issues with following forks, and only a few FreeBSD
|
||||
specific syscalls are decoded right now.
|
||||
|
||||
- This was tested on FreeBSD 4.0. I believe the tracing interface is
|
||||
present since at least FreeBSD 3.0, so it "should" work on all
|
||||
latest releases. I have no idea for other BSDs, though.
|
||||
|
||||
|
||||
Gaël Roualland <gael.roualland@iname.com>
|
||||
|
@ -7,7 +7,7 @@ If you want to compile strace on a Linux system please make sure that
|
||||
you use recent kernel headers. Strace needs those to get the proper data
|
||||
structures and constatns used by the kernel, since these can be
|
||||
different from the structures that the C library uses. Currently you
|
||||
will need at least a 2.2.7 or newer kernel.
|
||||
will need at least a 2.2.7 or newer kernel.
|
||||
|
||||
To complicate things a bit further strace might not compile if you are
|
||||
using development kernels. These tend to have headers that conflict with
|
||||
|
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -7,7 +7,7 @@ strace (4.5.17-1) unstable; urgency=low
|
||||
strace (4.5.16+cvs20080708-2) unstable; urgency=low
|
||||
|
||||
* Rerun autotools in correct order.
|
||||
* Add strace64 package on i386, powerpc, s390 and sparc,
|
||||
* Add strace64 package on i386, powerpc, s390 and sparc,
|
||||
closes: #491167, #491188
|
||||
|
||||
-- Frederik Schüler <fs@debian.org> Thu, 17 Jul 2008 17:21:27 +0200
|
||||
|
2
debian/control
vendored
2
debian/control
vendored
@ -29,7 +29,7 @@ Description: A system call tracer for 64bit binaries
|
||||
The program to be traced need not be recompiled for this, so you can
|
||||
use it on binaries for which you don't have source.
|
||||
.
|
||||
This package containts the 64bit version of the binary, intended for
|
||||
This package containts the 64bit version of the binary, intended for
|
||||
biarch systems with 32bit userland and 64bit kernel.
|
||||
.
|
||||
System calls and signals are events that happen at the user/kernel
|
||||
|
@ -40,14 +40,14 @@ use POSIX;
|
||||
use vars qw(%sysprint %syscat);
|
||||
|
||||
sub usage() {
|
||||
print STDERR
|
||||
print STDERR
|
||||
"usage: $0 syscalls.master [<syscalls.print>] [<syscalls.cat>]\n";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
sub readprint ($) {
|
||||
my($fprint) = @_;
|
||||
|
||||
|
||||
open (PRINT, "< $fprint") || die "can't open $fprint: $!";
|
||||
while(<PRINT>) {
|
||||
chomp;
|
||||
@ -68,7 +68,7 @@ sub readprint ($) {
|
||||
|
||||
sub readcat ($) {
|
||||
my($fcat) = @_;
|
||||
|
||||
|
||||
open (CAT, "< $fcat") || die "can't open $fcat: $!";
|
||||
while(<CAT>) {
|
||||
chomp;
|
||||
@ -119,7 +119,7 @@ while (<MASTER>) {
|
||||
|
||||
$proto = $3;
|
||||
$ext = $4;
|
||||
|
||||
|
||||
if ($1 > $sysnum) { # syscall gap
|
||||
while($sysnum < $1) {
|
||||
print " { -1,\t0,\tprintargs,\t\"SYS_$sysnum\"\t}, /* $sysnum */\n";
|
||||
@ -128,7 +128,7 @@ while (<MASTER>) {
|
||||
} elsif ($1 < $sysnum) {
|
||||
warn "error in master file: syscall $1 found, expecting $sysnum.";
|
||||
}
|
||||
|
||||
|
||||
if ($proto =~ /^[^\s]+\s+([^\s]+)\s*\(([^)]*)\);/) {
|
||||
my @args = split(/,/, $2);
|
||||
$nargs = @args;
|
||||
|
@ -3,12 +3,12 @@
|
||||
#ent.h) and the x86_64 unistd.h
|
||||
%conv = (
|
||||
"exit" => "_exit",
|
||||
);
|
||||
);
|
||||
|
||||
%known = (
|
||||
"mmap" => "sys_mmap",
|
||||
"sched_yield" => "printargs",
|
||||
);
|
||||
"sched_yield" => "printargs",
|
||||
);
|
||||
|
||||
# only used when the template file has no entry
|
||||
%args = (
|
||||
@ -17,7 +17,7 @@
|
||||
"gettid" => 0,
|
||||
"readahead" => 3,
|
||||
# should decode all these:
|
||||
"setxattr" => 5,
|
||||
"setxattr" => 5,
|
||||
"lsetxattr" => 5,
|
||||
"fsetxattr" => 5,
|
||||
"getxattr" => 4,
|
||||
@ -30,48 +30,48 @@
|
||||
"lremovexattr" => 2,
|
||||
"fremovexattr" => 2,
|
||||
"mmap" => 6,
|
||||
"sched_yield" => 0,
|
||||
);
|
||||
"sched_yield" => 0,
|
||||
);
|
||||
|
||||
open(F,$ARGV[0]) || die "cannot open template file $ARGV[0]\n";
|
||||
open(F,$ARGV[0]) || die "cannot open template file $ARGV[0]\n";
|
||||
|
||||
while (<F>) {
|
||||
next unless /{/;
|
||||
s/\/\*.*\*\///;
|
||||
while (<F>) {
|
||||
next unless /{/;
|
||||
s/\/\*.*\*\///;
|
||||
($name) = /"([^"]+)"/;
|
||||
chomp;
|
||||
$call{$name} = $_;
|
||||
}
|
||||
chomp;
|
||||
$call{$name} = $_;
|
||||
}
|
||||
|
||||
open(SL, ">syscallnum.h") || die "cannot create syscallnum.h\n";
|
||||
open(SL, ">syscallnum.h") || die "cannot create syscallnum.h\n";
|
||||
|
||||
|
||||
|
||||
open(S,$ARGV[1]) || die "cannot open syscall file $ARGV[1]\n";
|
||||
while (<S>) {
|
||||
$name = "";
|
||||
next unless (($name, $num) = /define\s+__NR_(\S+)\s+(\d+)/);
|
||||
next if $name eq "";
|
||||
open(S,$ARGV[1]) || die "cannot open syscall file $ARGV[1]\n";
|
||||
while (<S>) {
|
||||
$name = "";
|
||||
next unless (($name, $num) = /define\s+__NR_(\S+)\s+(\d+)/);
|
||||
next if $name eq "";
|
||||
|
||||
$name = $conv{$name} if defined($conv{$name});
|
||||
$name = $conv{$name} if defined($conv{$name});
|
||||
|
||||
if (!defined($call{$name})) {
|
||||
unless (defined($args{$name})) {
|
||||
print STDERR "unknown call $name $num\n";
|
||||
$na = 3;
|
||||
} else {
|
||||
$na = $args{$name};
|
||||
}
|
||||
if (defined($known{$name})) {
|
||||
$func = $known{$name};
|
||||
} else {
|
||||
$func = "printargs";
|
||||
}
|
||||
print "\t{ $na,\t0,\t$func,\t\"$name\" }, /* $num */\n";
|
||||
} else {
|
||||
print "$call{$name} /* $num */\n";
|
||||
}
|
||||
if (!defined($call{$name})) {
|
||||
unless (defined($args{$name})) {
|
||||
print STDERR "unknown call $name $num\n";
|
||||
$na = 3;
|
||||
} else {
|
||||
$na = $args{$name};
|
||||
}
|
||||
if (defined($known{$name})) {
|
||||
$func = $known{$name};
|
||||
} else {
|
||||
$func = "printargs";
|
||||
}
|
||||
print "\t{ $na,\t0,\t$func,\t\"$name\" }, /* $num */\n";
|
||||
} else {
|
||||
print "$call{$name} /* $num */\n";
|
||||
}
|
||||
print SL "#define SYS_$name $num\n"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
12
strace-graph
12
strace-graph
@ -115,7 +115,7 @@ sub parse_str {
|
||||
return (undef, $in);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub parse_one {
|
||||
my ($in) = @_;
|
||||
@ -188,19 +188,19 @@ sub parseargs {
|
||||
unless (length($in) == 0 or $in =~ s/^, //) {
|
||||
print STDERR "$0: $ARGV: $.: missing comma.\n";
|
||||
return undef;
|
||||
}
|
||||
}
|
||||
}
|
||||
return @args;
|
||||
}
|
||||
|
||||
|
||||
|
||||
my $depth = "";
|
||||
|
||||
# process info, indexed by pid.
|
||||
# fields:
|
||||
# fields:
|
||||
# parent pid number
|
||||
# seq forks and execs for this pid, in sequence (array)
|
||||
|
||||
|
||||
# filename and argv (from latest exec)
|
||||
# basename (derived from filename)
|
||||
# argv[0] is modified to add the basename if it differs from the 0th argument.
|
||||
@ -336,4 +336,4 @@ sub display_trace {
|
||||
|
||||
display_pid_trace($startpid, "");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user