Commit Graph

17 Commits

Author SHA1 Message Date
Warner Losh 77892acd6a MAXPATHLEN contains the trailing NUL. 2001-03-01 06:00:22 +00:00
Kirk McKusick 1f7d250182 Change the proc information returned from the kernel so that it
no longer contains kernel specific data structures, but rather
only scalar values and structures that are already part of the
kernel/user interface, specifically rusage and rtprio. It no
longer contains proc, session, pcred, ucred, procsig, vmspace,
pstats, mtx, sigiolst, klist, callout, pasleep, or mdproc. If
any of these changed in size, ps, w, fstat, gcore, systat, and
top would all stop working. The new structure has over 200 bytes
of unassigned space for future values to be added, yet is nearly
100 bytes smaller per entry than the structure that it replaced.
2000-12-12 07:25:57 +00:00
Peter Wemm c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
John Polstra caf4d16aef Add braces to appease the egcs -Wall mom. 1999-07-17 19:03:20 +00:00
John Polstra 00bf1f3066 Fix errors detected by -Wformat. 1998-11-01 06:35:36 +00:00
John Polstra 283c2d5af4 When the "-s" option is given, try to ensure that we restart the
target process even if we are killed or die due to an error.
1998-10-22 04:02:37 +00:00
John Polstra 52e7cc0a90 Make gcore work for ELF. 1998-10-19 19:42:18 +00:00
John Polstra 1c35b08ea6 Check the executable's header to make sure it is a valid executable.
If it is ELF, print a diagnostic saying that it is not supported yet
by this program.  This is a stop-gap anti-bug-report measure because
it looks like there won't be time to implement gcore's ELF support
before 3.0 is released.
1998-10-14 16:16:50 +00:00
Dag-Erling Smørgrav 49ee7af69e Don't require an executable file name. If no executable image is
specified, use /proc/<pid>/file. Document it.

PR:		bin/7915
Suggested-By:	Wolfram Schneider <wosch@panke.de.freebsd.org>
1998-09-14 10:09:30 +00:00
Wolfram Schneider 63d82ffc0e Check the text segment size of the executable and the process. If
not equal, the command line arguments are wrong. E.g.:

$./gcore /bin/sh 1761

$ ./gcore /usr/tmp/chroot/bin/sh 1761
gcore: The executable /usr/tmp/chroot/bin/sh does not belong to process 1761!
Text segment size (in bytes): executable 303104, process 294912
1998-08-24 16:25:30 +00:00
John Polstra 8f10c09860 Add missing argument detected by "-Wformat". Make messages more
consistent.
1997-11-18 03:50:25 +00:00
Philippe Charnier a5bf6586d9 Use err(3) instead of local redefinition. 1997-07-08 11:04:19 +00:00
Warner Losh 1c8af87873 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 04:34:07 +00:00
Jordan K. Hubbard 526195ad0d General -Wall warning cleanup, part I.
Submitted-By: Kent Vander Velden <graphix@iastate.edu>
1996-07-12 19:08:36 +00:00
Poul-Henning Kamp 875c5798b6 NBPG -> PAGE_SIZE 1996-05-02 09:10:21 +00:00
Rodney W. Grimes 7799f52a32 Remove trailing whitespace. 1995-05-30 06:41:30 +00:00
Rodney W. Grimes 9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00