Skip to content

Commit

Permalink
trailing whitespace removal, no code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dvlasenk committed Jan 2, 2009
1 parent 06bfe26 commit 402eeb6
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 54 deletions.
6 changes: 3 additions & 3 deletions README-freebsd
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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>
2 changes: 1 addition & 1 deletion README-linux
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions freebsd/syscalls.pl
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@
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;
Expand All @@ -68,7 +68,7 @@ ($)

sub readcat ($) {
my($fcat) = @_;

open (CAT, "< $fcat") || die "can't open $fcat: $!";
while(<CAT>) {
chomp;
Expand Down Expand Up @@ -119,7 +119,7 @@ ($)

$proto = $3;
$ext = $4;

if ($1 > $sysnum) { # syscall gap
while($sysnum < $1) {
print " { -1,\t0,\tprintargs,\t\"SYS_$sysnum\"\t}, /* $sysnum */\n";
Expand All @@ -128,7 +128,7 @@ ($)
} 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;
Expand Down
74 changes: 37 additions & 37 deletions linux/x86_64/gentab.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand All @@ -17,7 +17,7 @@
"gettid" => 0,
"readahead" => 3,
# should decode all these:
"setxattr" => 5,
"setxattr" => 5,
"lsetxattr" => 5,
"fsetxattr" => 5,
"getxattr" => 4,
Expand All @@ -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 changes: 6 additions & 6 deletions strace-graph
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ sub parse_str {
return (undef, $in);
}
}
}
}

sub parse_one {
my ($in) = @_;
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -336,4 +336,4 @@ sub display_trace {

display_pid_trace($startpid, "");
}

0 comments on commit 402eeb6

Please sign in to comment.