summaryrefslogtreecommitdiff
path: root/lib/libkvm
Commit message (Collapse)AuthorAgeFilesLines
* $Id$ -> $FreeBSD$Peter Wemm1999-08-292-2/+2
| | | | Notes: svn path=/stable/3/; revision=50572
* This commit was manufactured by cvs2svn to create branch 'RELENG_3'.cvs2svn1999-01-212-276/+0
| | | | Notes: svn path=/stable/3/; revision=42951
* <sys/types.h> isn't a prerequisite for <kvm.h>.Bruce Evans1998-12-161-1/+0
| | | | Notes: svn path=/head/; revision=41884
* The previous commit was bogus. <stdlib.h> was never a prerequisiteBruce Evans1998-12-161-2/+0
| | | | | | | | for <kvm.h> or kvm_getloadavg(), and <sys/types.h> was only a prerequisite for <kvm.h> when <kvm.h> was broken. Notes: svn path=/head/; revision=41883
* Declare size_t and ssize_t if they are not already declared, so thatBruce Evans1998-12-161-6/+15
| | | | | | | | | | | | | | | | | | <kvm.h> is self-sufficient again. Moved typedefs and forward struct declarations out of __BEGIN_DECLS/ __END_DECLS. Don't comment out the prototype for kvm_uread(). This was a 4 year old kludge for previous breakage of self-sufficiency. The prototypwe was broken instead. Fixed bitrot (const poisoning) in the type of kvm_uread(). Fixed order of the declaration of kvm_uread(). Notes: svn path=/head/; revision=41882
* Adjust for kern.ps_strings and PS_STRINGS not being a pointer. ThisBruce Evans1998-12-161-17/+12
| | | | | | | | | | | | | fixes a type mismatch in the call to kvm_uread(). The bug has gone undetected for almost 3 years because kvm_uproc()'s protoype has been disabled for almost 4 years. Trust sysctlbyname() to work properly if it succeeds. Fixed style bugs in revs. 1.19 and 1.22. Notes: svn path=/head/; revision=41880
* Add required #include references to manual pageMatthew Dillon1998-12-131-0/+2
| | | | Notes: svn path=/head/; revision=41713
* Avoid the "Cannot allocate memory" problem that appears on heavilyDag-Erling Smørgrav1998-10-121-4/+10
| | | | | | | | | | | | loaded systems by retrying the sysctl() with a larger buffer if it fails with ENOMEM. For good measure, allocate 10% more memory than sysctl() claims is necessary. PR: 8275 Reviewed by: David Greenman <dg@freebsd.org> Notes: svn path=/head/; revision=40268
* Adjust the declarations of kvm_read and kvm_write to match reality a littleDoug Rabson1998-09-161-2/+2
| | | | | | | closer. Notes: svn path=/head/; revision=39353
* Replace memory leaking instances of realloc with non-leaking reallocf.Warner Losh1998-09-161-1/+3
| | | | | | | | | | | | | | In some cases replace if (a == null) a = malloc(x); else a = realloc(a, x); with simple reallocf(a, x). Per ANSI-C, this is guaranteed to be the same thing. I've been running these on my system here w/o ill effects for some time. However, the CTM-express is at part 6 of 34 for the CAM changes, so I've not been able to do a build world with the CAM in the tree with these changes. Shouldn't impact anything, but... Notes: svn path=/head/; revision=39327
* Change ${MACHINE} into ${MACHINE_ARCH} to support MACHINE=pc98.KATO Takenori1998-09-091-1/+1
| | | | Notes: svn path=/head/; revision=38996
* The length argument to sysctl is now size_t.Doug Rabson1998-08-252-3/+6
| | | | Notes: svn path=/head/; revision=38534
* Nuke unsupported architecture filesGary Palmer1998-08-222-493/+0
| | | | Notes: svn path=/head/; revision=38478
* Add an alpha machdep for kvm. The vatop functions are stubbed out forDoug Rabson1998-08-151-0/+197
| | | | | | | | | | now (mainly because I haven't ported them from the NetBSD crash dump environment). Obtained from: NetBSD Notes: svn path=/head/; revision=38329
* Allow /dev/null as path for the "/dev/mem" file, and assume that peoplePoul-Henning Kamp1998-06-302-30/+38
| | | | | | | | | | know what they're doing if they do that. This will allow ps to use the kvm_proc.c bits without having access to /dev/mem. Fix kvm_proc.c to not need /dev/mem for access to argv/envp Notes: svn path=/head/; revision=37316
* Fixed bugs in the conversion of kvm to to use procfs in rev.1.3. AllBruce Evans1998-01-161-9/+14
| | | | | | | | | | | | | | | are in kvm_uread(): - the setting of errno before checking it in the lseek() was lost. - EOF handling was lost. kvm_uread() retried forever on EOF. EOF is not really an error, but report it one as in rev.1.2. - reporting of errno after a read error was lost. Fixed style bugs in rev.1.3 and rev.1.12. Not fixed: errno is not reported after lseek() failures. Notes: svn path=/head/; revision=32568
* -I${DESTDIR}/sys -> -I${.CURDIR}/../../sys.Bruce Evans1997-08-261-1/+1
| | | | Notes: svn path=/head/; revision=28801
* Copy code from gnu/usr.bin/gdb/gdb/kvm-fbsd.c to deal with 4 MB pages.Tor Egge1997-08-172-0/+26
| | | | Notes: svn path=/head/; revision=28318
* Add ${DESTDIR} in front of absolute path.Satoshi Asami1997-07-181-1/+1
| | | | Notes: svn path=/head/; revision=27492
* Fill in parent process id when reading process information from aTor Egge1997-06-251-0/+12
| | | | | | | memory dump. This fixes one of the problems noted in PR kern/3581. Notes: svn path=/head/; revision=26947
* Fixed #include and/or prototype bugs in synopsis.Bruce Evans1997-04-191-1/+0
| | | | Notes: svn path=/head/; revision=25028
* Fixed #include and/or prototype bugs in synopsis.Bruce Evans1997-04-132-2/+3
| | | | Notes: svn path=/head/; revision=24885
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=22993
* Sort cross references.Wolfram Schneider1997-01-202-6/+6
| | | | Notes: svn path=/head/; revision=21907
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* Fix the short description of kvm_getloadavg(3) to reflectMike Pritchard1997-01-021-2/+1
| | | | | | | | | | | what the function really does. Also fix a small mdoc problem I noticed while in there. Obtained from: NetBSD-bugs (NetBSD PR#3077) Notes: svn path=/head/; revision=21233
* kvm_malloc:Andrey A. Chernov1996-11-111-3/+3
| | | | | | | | | | When malloc fails. don't try to memset NULL pointer, it cause core dump Replace malloc+memset with calloc, theoretically it can do some optimization of zeroing process internally Improve error diagnostic Notes: svn path=/head/; revision=19629
* Implement virtual-to-physical address mapping for the kvm library onPeter Wemm1996-10-072-40/+130
| | | | | | | | | | | | | | | dead kernel debugging. The previous code was a "do nothing". The most obvious side effect of this is that you can now do things like this and reasonably expect them to work: dmesg -M /var/crash/vmcore.3 -N /var/crash/kernel.3 ps -axl -M /var/crash/vmcore.3 -N /var/crash/kernel.3 A good deal of this was lifted from the gdb code to do this, as well as from NetBSD's libkvm (which has completely different VM macros) Notes: svn path=/head/; revision=18798
* General -Wall warning cleanup, part I.Jordan K. Hubbard1996-07-125-4/+11
| | | | | | | Submitted-By: Kent Vander Velden <graphix@iastate.edu> Notes: svn path=/head/; revision=17141
* Pass correct length OID to kernel for KERN_PROC_ALL.Poul-Henning Kamp1996-06-061-2/+2
| | | | Notes: svn path=/head/; revision=16158
* NBPG -> PAGE_SIZEPoul-Henning Kamp1996-05-023-10/+10
| | | | Notes: svn path=/head/; revision=15533
* From Lite2: proc and file LIST changesJeffrey Hsu1996-03-112-8/+10
| | | | Notes: svn path=/head/; revision=14523
* If the two recently added sysctl variables exist, use those rather thanPeter Wemm1996-02-241-2/+17
| | | | | | | | | | the statically compiled PS_STRINGS and USRSTACK variables. This prevents programs using setproctitle from coredumping if the kernel VM is increased, and stops libkvm users (w, ps, etc) from needing to be recompiled if only the VM layout changes. Notes: svn path=/head/; revision=14236
* Add some missing MLINKS, correct some cross references, correct someMike Pritchard1996-02-091-1/+0
| | | | | | | file locations and some minor formatting/style problems. Notes: svn path=/head/; revision=14003
* Another round of spelling fixes.Mike Pritchard1996-01-301-2/+2
| | | | Notes: svn path=/head/; revision=13754
* Extract the login name when doing a ps on a dead kernel.Peter Wemm1996-01-011-0/+2
| | | | Notes: svn path=/head/; revision=13156
* Cosmetic cleanup and documentation of kvm_argv.. Hopefully the flow ofPeter Wemm1995-12-161-6/+65
| | | | | | | the routine can be much more easily understood now... :-) Notes: svn path=/head/; revision=12885
* phkmalloc strikes again! :-) Another use of un-cleared returns fromPeter Wemm1995-12-091-0/+3
| | | | | | | malloc squashed... Notes: svn path=/head/; revision=12683
* Updates to read the extra indirection in ps_strings. Note that anyPeter Wemm1995-12-092-35/+53
| | | | | | | | | | static executables that depend on this will need to be relinked (ie: do this before 'ps'), but the dynamic linked stuff should be OK (ie: 'w') Obtained from: NetBSD (not much point reinventing the wheel.. :-) Notes: svn path=/head/; revision=12682
* Removed unnecessary include of <sys/tty.h>. tty.h apparently once hadBruce Evans1995-10-221-1/+0
| | | | | | | some user interfaces in it. It no longer does. Notes: svn path=/head/; revision=11679
* 41 headers must be implicitly included and one more (<sys/param.h>) mustBruce Evans1995-06-251-1/+2
| | | | | | | be explicitly included before kvm_getprocs() can be used. Notes: svn path=/head/; revision=9303
* Update the man page for kvm_getprocs.3 to reflect our sysctl-basedJoerg Wunsch1995-06-241-9/+9
| | | | | | | | | kvm mechanism. Submitted by: (Vic Abell) <abe@cc.purdue.edu> Notes: svn path=/head/; revision=9302
* Remove trailing whitespace.Rodney W. Grimes1995-05-308-37/+37
| | | | Notes: svn path=/head/; revision=8870
* Comment out declaration of kvm_uread until it can be fixed correctly.Rodney W. Grimes1995-03-201-0/+2
| | | | Notes: svn path=/head/; revision=7189
* Change u_long to unsigned long to be consistent.Rodney W. Grimes1995-03-201-1/+2
| | | | Notes: svn path=/head/; revision=7188
* libkvm exports kvm_uread(), so do declare it in the header file.Joerg Wunsch1995-03-191-0/+1
| | | | | | | Got apparent by Philippe's -Wall patch for /usr/bin. Notes: svn path=/head/; revision=7167
* Cast the offset of one call to lseek() to off_t, as it's already doneJoerg Wunsch1995-03-191-1/+1
| | | | | | | | | | | in all other places here. This is a hack, the interface should be changed to use off_t's everywhere around, but this will require to update all the programs that happen to use libkvm. Notes: svn path=/head/; revision=7166
* Fix previous fix to agree with the man page - don't report errors inBruce Evans1995-02-251-2/+3
| | | | | | | kvm_open() if errstr is NULL. Notes: svn path=/head/; revision=6701
* Remove some unused variables and fix two blatant core dump triggers.Poul-Henning Kamp1995-02-243-11/+9
| | | | Notes: svn path=/head/; revision=6683
* A semicolon was lost.Poul-Henning Kamp1994-11-072-2/+2
| | | | Notes: svn path=/head/; revision=4241