Commit Graph

58 Commits

Author SHA1 Message Date
das
b4805b06a8 Remove a.out support from gcore(1). 2004-11-27 06:46:48 +00:00
das
6aebc04f23 gcore(1) apparently still cares about a.out core dumps, so it still
needs to know that a 1-page U area is part of the dump format.

Reviewed by:	arch@
2004-11-20 02:30:02 +00:00
rwatson
9de1675166 Teach gcore about the pathname field of '/proc/*/map' so that it doesn't
spin when its parser gets confused by a lack of end-of-line.

Submitted by:	Dan Nelson <dan@dan.emsphone.com>
PR:		68839
2004-07-12 20:19:40 +00:00
ru
cbb49d7abe Deal with double whitespace. 2004-07-03 00:24:45 +00:00
ru
1fd830331f Mechanically kill hard sentence breaks. 2004-07-02 22:22:35 +00:00
dwmalone
460ec1fed3 Fix some WARNS:
1) Remove some unused variables.
2) Mark some things aas static or __unused.
3) Cast to make sure we're comparing the same types.
2004-02-15 22:48:25 +00:00
peter
42037c3273 Add #include <sys/queue.h> for sparc64's benefit. The MD includes there
have less polution.
2002-09-13 18:24:59 +00:00
peter
87f05db624 Use a crowbar to move the a.out code out of gcore.c and into its own
file so that we have a chance of using gcore on non-i386 platforms.  Use
linker sets to reduce the registration glue.  Remove md-sparc.c, we do not
have an a.out sparc32 port.  aoutcore.c was repocopied from gcore.c.
2002-09-13 16:33:35 +00:00
iedowse
50afb0aebb Include stdint.h to make this compile.
Submitted by:	Garance A Drosihn <drosih@rpi.edu>
2002-09-05 07:43:34 +00:00
dwmalone
e3e153e6ce ANSIify function definitions.
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.

Reviewed by:	md5
2002-09-04 23:29:10 +00:00
obrien
c65b40cf60 Consistently wrap CSRG SCM ID.
Requested by:	bde
2002-06-30 09:24:25 +00:00
obrien
3cb8dae44d Consistently use FBSDID 2002-06-30 05:25:07 +00:00
charnier
75f0c117d4 Use `The .Nm utility' 2002-04-19 23:44:58 +00:00
charnier
e72ce128b5 Do not print error message twice. 2002-04-12 21:36:54 +00:00
dwmalone
deb0721146 Don't use gcc specific flags. 2002-03-30 17:19:40 +00:00
charnier
4e0a550850 Add FBSDID. Do not \n terminate err() strings. Spelling. 2002-03-26 12:26:59 +00:00
imp
0338ac6a1a remove __P 2002-03-22 01:22:50 +00:00
bde
ecc2123075 Removed unused include of kernel-only file <sys/lock.h>. 2001-10-13 04:54:03 +00:00
bde
94220967cf Compensate for "Compensate for header dethreading" by backing it out. 2001-10-10 17:48:44 +00:00
julian
aff3918a2c KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after:    ha ha ha ha
2001-09-12 08:38:13 +00:00
mikeh
8d0135ea5f Fix usage message, the executable is optional.
PR:		bin/29735
MFC after:	2 weeks
2001-08-15 21:25:50 +00:00
dd
7d1013753f Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
ru
ecbb298b07 mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 14:16:33 +00:00
jlemon
b1219f0076 Null terminate buffer.
PR: 23150
Submitted by: Dan Nelson <dnelson@emsphone.com>
MFC in: 1 week
2001-06-07 05:26:26 +00:00
obrien
6789bcb2e6 Fix minor style issue from previous commit. 2001-05-03 00:35:53 +00:00
obrien
e1f6b578aa * include/elf.h has been repo copied to include/elf-hints.h, and it no
longer includes machine/elf.h.
* consumers of elf.h now use the minimalist elf header possible.

This change is motivated by Binutils 2.11.0 and too much clashing over
our base elf headers and the Binutils elf headers.
2001-05-02 23:56:21 +00:00
markm
6a0497c594 Compensate for header dethreading. 2001-05-01 08:46:02 +00:00
imp
dc71c3fa24 MAXPATHLEN contains the trailing NUL. 2001-03-01 06:00:22 +00:00
ru
655e7db87e Prepare for mdoc(7)NG. 2000-12-19 16:00:12 +00:00
mckusick
7d330b9cd3 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
ru
b0a457d5ef Fixed typo: .EL -> .El 2000-11-06 09:20:09 +00:00
obrien
70633e481c Change our ELF binary branding to something more acceptable to the Binutils
maintainers.

After we established our branding method of writing upto 8 characters of
the OS name into the ELF header in the padding; the Binutils maintainers
and/or SCO (as USL) decided that instead the ELF header should grow two new
fields -- EI_OSABI and EI_ABIVERSION.  Each of these are an 8-bit unsigned
integer.  SCO has assigned official values for the EI_OSABI field.  In
addition to this, the Binutils maintainers and NetBSD decided that a better
ELF branding method was to include ABI information in a ".note" ELF
section.

With this set of changes, we will now create ELF binaries branded using
both "official" methods.  Due to the complexity of adding a section to a
binary, binaries branded with ``brandelf'' will only brand using the
EI_OSABI method.  Also due to the complexity of pulling a section out of an
ELF file vs. poking around in the ELF header, our image activator only
looks at the EI_OSABI header field.

Note that a new kernel can still properly load old binaries except for
Linux static binaries branded in our old method.

  *
  * For a short period of time, ``ld'' will also brand ELF binaries
  * using our old method.  This is so people can still use kernel.old
  * with a new world.  This support will be removed before 5.0-RELEASE,
  * and may not last anywhere upto the actual release.  My expiration
  * time for this is about 6mo.
  *
2000-04-18 02:39:26 +00:00
sheldonh
d39e57413d Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 12:20:22 +00:00
marcel
b6a67d6d2b ${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
phk
664ff4bcbf useracc() the prequel:
Merge the contents (less some trivial bordering the silly comments)
of <vm/vm_prot.h> and <vm/vm_inherit.h> into <vm/vm.h>.  This puts
the #defines for the vm_inherit_t and vm_prot_t types next to their
typedefs.

This paves the road for the commit to follow shortly: change
useracc() to use VM_PROT_{READ|WRITE} rather than B_{READ|WRITE}
as argument.
1999-10-29 18:09:36 +00:00
peter
e4b04a2b21 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
jdp
bf8c1bdcf3 Add braces to appease the egcs -Wall mom. 1999-07-17 19:03:20 +00:00
jdp
5334e6ee4e Make gcore work again. It was broken by a format change in the
procfs map file when object IDs were eliminated in the mega-commit
that included procfs_map.c revision 1.19.

The map file is a terrible hodge-podge.  The fields that are used
mainly for kernel debugging should be moved out of it into a
separate file, so that the interface presented by the map file to
applications can remain stable in the face of VM system changes.
1999-07-17 18:58:32 +00:00
nik
7e91e73b9f Add $Id$, to make it simpler for members of the translation teams to
track.

The $Id$ line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;

     .\"    $Id$
     .\"

If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.

Approved by:            bde
1999-07-12 20:24:20 +00:00
jdp
47816f3be0 Fix errors detected by -Wformat. 1998-11-01 06:35:36 +00:00
jdp
aa1aab7648 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
jdp
56b8d276ed Make gcore work for ELF. 1998-10-19 19:42:18 +00:00
jdp
c3d7a50503 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
des
a0201a25a8 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
wosch
a21aee1c42 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
jdp
6411eab8ec Add missing argument detected by "-Wformat". Make messages more
consistent.
1997-11-18 03:50:25 +00:00
charnier
2dab39b518 Use err(3) instead of local redefinition. 1997-07-08 11:04:19 +00:00
steve
9c6b7d527a Show the real revision date and not the date that this
manpage is being viewed.
1997-06-23 04:03:49 +00:00
imp
cd84ece5fd 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
mpp
2370082340 Use the .Bx macro where appropriate. 1996-08-23 20:36:11 +00:00