Commit Graph

79 Commits

Author SHA1 Message Date
Ruslan Ermilov
06e482e60a mdoc(7) police: markup polishing.
Approved by:	re
2002-11-26 17:33:37 +00:00
Marcel Moolenaar
a3e32192a5 Port to ia64. It builds, but usability is very limited. 2002-11-10 00:59:13 +00:00
David Malone
eb9741e47d Various cleanups of truss:
1) Missing include.
2) Constness.
3) ANSIfication.
4) Avoid some shadowing.
5) Add/clarify some error messages.
6) Some int functions were using return without a value.
7) Mark some parameters as unused.
8) Cast a value we know is non-negative to a size_t before comparing.
2002-11-09 22:46:51 +00:00
David Malone
967706f308 Check if name is NULL before we strcmp the syscall name. This was
sometimes triggered if you began trussing a process while it was
in a syscall, as the name is filled in when the syscall is made.
2002-11-09 22:28:38 +00:00
Mike Barcroft
1d631f7ef1 Don't depend on <signal.h> to include <sys/time.h>, instead include
<sys/time.h> directly.  This is mostly bogus since CLOCK_REALTIME
should be defined in <time.h>, which these files already include.
2002-10-06 21:46:04 +00:00
Matthew N. Dodd
fb034d05ac Remove an unnecessary cast. 2002-08-07 11:35:18 +00:00
Matthew N. Dodd
37169f9446 - Use time.h not sys/time.h.
- Fix printf format errors.

Submitted by:	 bde
2002-08-06 12:46:14 +00:00
Matthew N. Dodd
28c4ea6da8 Remove extra space in output. 2002-08-05 14:56:20 +00:00
Matthew N. Dodd
42a389ac3e Diff reduction. 2002-08-05 13:23:41 +00:00
Matthew N. Dodd
203098d816 Use timespec not timeval. 2002-08-05 12:22:55 +00:00
Jake Burkholder
f84c971a6f Ported to sparc64. 2002-08-04 17:57:01 +00:00
Bruce Evans
c69d844294 Include <sys/time.h> for the declaration of struct timeval. Do not
depend on namespace pollution in <signal.h>.  (truss shouldn't be
using timevals anyway, since it was implemented long after timevals
were obsoleted by timespecs.)
2002-08-04 10:57:41 +00:00
Matthew N. Dodd
9897b20356 Add options to print the argument and environment string parameters to
execve().

This could be done in a more general manner but it still wouldn't
be very pretty.

MFC after:	 3 weeks
2002-08-04 02:24:21 +00:00
Matthew N. Dodd
0629483c41 Add a "FreeBSD ELF32" entry to ex_types[]. 2002-08-04 02:20:06 +00:00
Matthew N. Dodd
88a6987d40 Terminate the output line when a non-returning syscall is printed. 2002-08-04 01:28:13 +00:00
Matthew N. Dodd
0d0bd00edd Add options to print absolute and relative timestamps.
PR:		 bin/25587 (in part)
MFC after:	 3 weeks
2002-08-04 01:27:31 +00:00
Matthew N. Dodd
c03bfcc871 Allow tracking fork()ed children.
PR:		 bin/25587 (in part)
MFC after:	3 weeks
2002-08-04 01:02:52 +00:00
Matthew N. Dodd
ec0bed25ba Parameterize globals.
PR:		bin/25587 (in part)
MFC after:	3 weeks
2002-08-04 00:46:48 +00:00
Mark Murray
bfc3d86a24 s/inline/__inline/ 2002-07-19 13:49:37 +00:00
Peter Wemm
f81e3ffe10 OOPS! rev 1.16 accidently changed the default outfile from stderr to
stdout.  Unfortunately, DES mfc'ed this change in 1.15.2.1 (this
part probably should not have been) so it is broken there too.
truss is documented to use stderr, and other implementations use stderr.

Submitted by:	Arne Dag Fidjestøl <adf@idi.ntnu.no>
2002-05-16 21:58:57 +00:00
Peter Wemm
02b8e10aad Do not bother with #include <machine/psl.h> since it is just a stub file
that says something like "/* Not used on Alpha */".
2002-05-01 06:23:48 +00:00
David Malone
7c8225cab8 Use fseeko and uintptr_t to make sure that we get a sensible offset
when trying to read from the stack.

PR:		37104
Submitted by:	Thomas Quinot <thomas@cuivre.fr.eu.org>
MFC after:	3 weeks
2002-04-21 19:04:26 +00:00
Philippe Charnier
e8937ba009 Use `The .Nm utility' 2002-04-20 12:18:28 +00:00
Ruslan Ermilov
b2490f915f I now don't seem to be able to reproduce the -DNOCLEAN buildworld
breakage with ioctl.c.  The .depend file should track dependencies
just fine, and the worst we can have is to miss new ioctls.

But I still think it's a good idea to have -DNOCLEAN build produce
the same ioctl.c as it would without -DNOCLEAN.

Prodded for a long time by:	bde
2002-04-11 14:49:32 +00:00
Mark Murray
e35f9517d6 Remove NO_WERRORs and WARNS=n's. To be revisited after GCC3. 2002-02-08 23:07:37 +00:00
Dag-Erling Smørgrav
4525f3a803 Fix the code that selects the default binary type if the actual type can't
be determined.

PR:		bin/34698
Submitted by:	(in part) Stefan Farfeleder <e0026813@stud3.tuwien.ac.at>
MFC after:	1 weeks
2002-02-08 12:42:55 +00:00
Alfred Perlstein
09bf11699f Print open(2) flags in hex instread of decimal for clarity. 2001-12-30 23:11:52 +00:00
Mark Murray
1be5d70444 Partial WARNS=1 fizes with NO_WERROR set to prevent world breakage.
Use __FBSDID().
2001-12-11 23:34:02 +00:00
Dag-Erling Smørgrav
6b9c8e04f9 Print the correct return code for successful Linux syscalls.
Submitted by:	Vitezslav Novy <vita@fio.cz>
PR:		32036
MFC after:	1 week
2001-11-17 17:18:36 +00:00
Brian Feldman
dec17687ad Add missing include for <ctype.h>
Make sockaddr printing code unbad.

Always copy in sizeof(sockaddr_un) bytes for an AF_UNIX sockaddr,
despite what the length may be.
2001-11-06 19:26:51 +00:00
Dag-Erling Smørgrav
6303ee4e2a Back out part of previous commit: remove #include <sys/proc.h>. 2001-10-22 15:32:12 +00:00
Dag-Erling Smørgrav
580e0a2b7a #include <sys/proc.h> where needed (for the stop event definitions) and
reorder includes everywhere to conform to style(9).
2001-10-22 02:02:00 +00:00
Dag-Erling Smørgrav
9ddd141263 Teach truss(1) to display sockaddrs. It currently knows about AF_INET,
AF_INET6 and AF_UNIX sockaddrs, and will recognize accept(), bind(),
connect(), getpeername() and getsockname() as syscalls taking sockaddr
arguments.  Some enterprising soul might want to add (and test) support
for the send() / recv() family of syscalls as well.

MFC after:	1 week
2001-10-21 21:57:10 +00:00
Joerg Wunsch
8a2ecea916 In get_string(), 0-terminate the contents of buf ``just in case'';
otherwise, if the very first fgetc() already yielded EOF, the returned
string won't get terminated at all.

MFC after:	1 day
2001-08-28 21:27:36 +00:00
Peter Wemm
9a2e7f1520 Initialize outfile in main() 2001-08-13 21:59:04 +00:00
Dima Dorfman
f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
Ruslan Ermilov
625003720a mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 14:16:33 +00:00
Ruslan Ermilov
9b88faecd3 Prepare for mdoc(7)NG. 2000-12-19 16:00:12 +00:00
Ruslan Ermilov
d7b336c076 mdoc(7) police: use canonical form of .Dd macro. 2000-12-11 15:47:53 +00:00
Ruslan Ermilov
8fe908ef0c mdoc(7) police: use the new features of the Nm macro. 2000-11-20 19:21:22 +00:00
Jordan K. Hubbard
c137d6780d cc -O -pipe -I/usr/src/usr.bin/kdump/../ktrace -I/usr/src/usr.bin/kdump/../.. Fix ioctl.c creation to deal with the depend case more properly.
Submitted by:   Ruslan Ermilov <ru@sunbay.com>
2000-09-14 18:53:08 +00:00
Jordan K. Hubbard
6b61687292 remove .PHONY to avoid gratuitous rebuild of ioctl.c each time.
Approved by:	sef
2000-09-14 06:20:19 +00:00
Ruslan Ermilov
ed7cf099c6 Make auto-generated ioctl.c to be always considered out of date
since it could potentially depend on any ${DESTDIR}/usr/include
preprocessor file.  This fixes the broken -DNOCLEAN world build
I experienced yesterday.
2000-08-01 10:21:13 +00:00
Sean Eric Fagan
6cb533fe1c Change the output of truss to more closely resemble SysV's. (Yes, it
really is much nicer looking.)

Submitted by:	"Matthew N. Dodd" <winter@jurai.net>
2000-03-18 08:49:41 +00:00
Sean Eric Fagan
05d5ca3587 Fix a leak. (Thanks Bruce, this was a bonehead mistake on my part :).)
Submitted by:	Bruce Evans
2000-02-15 20:25:47 +00:00
Mike Pritchard
f3c2973db7 Fxi various man pages to stop abusing the .Bx macro to generate
the string "FreeBSD".  Use the .Fx macro instead.  Also did some
minor re-wording/formatting to work around a deficiency with
the .Fx macro when it comes to puncuation characters other than
periods and commas.
2000-01-23 01:48:16 +00:00
Sean Eric Fagan
893618352c Handle the case where we truss an SUGID program -- in particular, we need
to wake up any processes waiting via PIOCWAIT on process exit, and truss
needs to be more aware that a process may actually disappear while it's
waiting.

Reviewed by:	Paul Saab <ps@yahoo-inc.com>
2000-01-10 04:09:05 +00:00
Marcel Moolenaar
6468017b7f Fix for the new usage of mkioctls 1999-12-03 17:35:34 +00:00
Marcel Moolenaar
0917704bd4 ${MACHINE} -> ${MACHINE_ARCH}
All Makefiles now use MACHINE_ARCH for the target architecture.
Unification is required for cross-building.

Tags added to:
	sys/boot/Makefile
	sys/boot/arc/loader/Makefile
	sys/kern/Makefile
	usr.bin/cpp/Makefile
	usr.bin/gcore/Makefile
	usr.bin/truss/Makefile

usr.bin/gcore/Makefile:
	fixed typo: MACHINDE -> MACHINE_ARCH
1999-11-14 13:54:44 +00:00
Mike Pritchard
49364d3cb3 Add $FreeBSD$ lines to man pages that are missing them to make it
easier for translation teams.

PR:		docs/13418
Submitted by:	Alexey Zelkin <phantom@cris.net>
1999-08-28 23:23:38 +00:00