summaryrefslogtreecommitdiffstats
path: root/usr.bin/ktrace (follow)
Commit message (Collapse)AuthorAgeFilesLines
* improve wrong markup and poor wording regarding the -t argumentschwarze2019-05-151-4/+4
| | | | | that was spotted by deraadt@; OK deraadt@ jmc@
* set tracefile to null when clearing points.tedu2019-01-061-1/+2
| | | | ok kn
* ioctlname() prototype is already in ../kdump/kdump.hguenther2018-04-261-2/+1
|
* Use <fcntl.h> instead of <sys/file.h> for open() and friends.guenther2018-04-261-6/+1
| | | | | | | Delete a bunch of unnecessary #includes and sort to match style(9) while doing the above cleanup. ok deraadt@ krw@
* usr/bin/ktrace: replace snprintf(3)/write(2) with dprintf(3)awolk2017-06-111-5/+2
| | | | | | Brought to attention by BlackFrog on #openbsd-daily OK deraadt@
* Add 'p' trace point for KTRFAC_PLEDGE, as noted byguenther2016-07-185-36/+38
| | | | | | Michal Mazurek <akfaew@jasminek.net> While here, fix handling of -t+ in ltrace.
* No more compat emulations, so remove ktrace EMUL records and the baggageguenther2016-03-064-19/+17
| | | | | | for generating and parsing them. ok mpi@ naddy@ millert@ deraadt@
* Fold "malloc" into "stdio" and -- recognizing that no program so far hasderaadt2015-10-251-2/+2
| | | | | | | | | | | | | | | used less than "stdio" -- include all the "self" operations. Instead of different defines, use regular PLEDGE_* in the "p_pledgenote" variable (which indicates the operation subtype a system call is performing). Many checks before easier to understand. p_pledgenote can often be passed directly to ktrace, so that kdump says: 15565 test CALL pledge(0xa9a3f804c51,0) 15565 test STRU pledge request="stdio" 15565 test RET pledge 0 15565 test CALL open(0xa9a3f804c57,0x2<O_RDWR>) 15565 test NAMI "/tmp/testfile" 15565 test PLDG open, "wpath", errno 1 Operation not permitted with help from semarie, ok guenther
* Add ktracing of argv and envp to execve(2), with envp not traced by defaultguenther2015-10-023-7/+20
| | | | ok tedu@ deraadt@
* put back an El macro, wrongly zapped in previous;jmc2015-09-071-1/+2
|
* Delete ktracing of context switches: it's unused, and not particularly useful,guenther2015-09-074-16/+8
| | | | | | | and doing VOP_WRITE() from inside tsleep/msleep makes the locking too complicated, making it harder to move forward on MP changes. ok deraadt@ kettenis@
* Convert many atoi() calls to strtonum(), adding range checks and failurederaadt2015-04-181-2/+9
| | | | | handling along the way. Reviews by Brendan MacDonell, Jeremy Devenport, florian, doug, millert
* remove the first comma from constructs like ", and," and ", or,": you can usejmc2015-03-132-7/+7
| | | | | "and" and "or" to join sentence clauses, and you can use commas, but both hinders reading;
* Make some $OpenBSD$ lines prettier/standardier by eliminatingkrw2015-01-191-1/+1
| | | | | | | superflous '*' after '/*' and adding blank after terminating '$'. Also eases parsing of the lines by simple awk scripts. Aesthetic approval from tedu@.
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-162-4/+5
| | | | | | | | | possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
* when ktrace() return ESRCH, the error is regarding the pid, not the pathnamederaadt2014-05-241-3/+9
| | | | ok miod
* add -t to usage() for ltrace;jmc2014-04-071-3/+3
|
* Add the -t ktrace(1) option to ltrace(1), so that you can trigger bothmiod2014-04-042-4/+55
| | | | | | | library function call trace and other kernel events trace at the same time. Suggested by kurt@ a long time ago, I have been sitting on this diff for no good reason.
* fix spacing in usage()sobrado2013-11-061-2/+2
|
* remove some redundancy within a sentence, and describe "!" as anjmc2013-09-121-3/+3
| | | | | | exclamation mark rather than a bang; From: Ross L Richardson
* typo in usage, comand/command; Arto Jonssonsthen2013-06-051-2/+2
|
* Pq -> Qq, as confirmed by miod;jmc2013-06-021-2/+2
|
* tweak previous; ok miodjmc2013-06-021-11/+14
|
* Introduce ltrace(1). This tool works with ld.so to inject utrace record formiod2013-06-013-48/+243
| | | | | | | | | | | | | | | | | each plt call, allowing to trace a binary linked against shared library at the public function call level. To do so, ltrace(1) sets up some environment variables to enable plt tracing in ld.so, and invokes ktrace(2) for utrace events. ld.so will force lazy binding and will send an utrace record in the plt resolver, without updating the plt. Minimal filtering capabilities are provided, inspired by Solaris' truss -u, to limit tracing to libraries and/or symbol names. Non-traced libraries and symbols will have the regular resolver processing, with the expected plt update. "Get it in" deraadt
* Userland bits for utrace record handling; from otto@miod2013-06-013-8/+17
|
* add -B to usage();jmc2012-07-121-2/+2
|
* Add -B option to pass down LD_BIND_NOW to suppress ld.so blatherguenther2012-07-122-5/+16
| | | | ok pirofti@ deraadt@
* zap trailing whitespace;jmc2011-07-081-2/+2
|
* Support sending struct info to kdump. So far for struct stat andotto2011-07-083-7/+13
| | | | struct sockaddress; mostly from freebsd. ok deraadt@ tedu@ nicm@
* some improvements from Cl??ment B??sch; ok tedujmc2011-06-251-5/+8
|
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-272-22/+2
| | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
* matthew haub pointed out that pid may be used uninitialized in some contextstedu2009-02-231-3/+3
| | | | ok deraadt
* convert to new .Dd format;jmc2007-05-311-2/+2
|
* fix the description of -f; from Igor Sobradojmc2007-04-011-2/+2
|
* let synopsis, options description, and usage() agree;jmc2007-03-032-5/+6
| | | | from Igor Sobrado, tweaked by myself
* do something sane to EXAMPLES;jmc2006-07-061-12/+13
|
* Xr ktrace 2 , else some people might mistake we use ptrace() or sth elsegrunk2006-07-061-2/+3
| | | | ok mickey@ jmc@
* Userland programs should include <errno.h> not <sys/errno.h>millert2005-12-211-3/+3
| | | | OK deraadt@
* ARGSUSED before signal handler with unused signoderaadt2004-09-141-2/+3
|
* - sync SYNOPSIS with usage()jmc2003-09-031-15/+10
| | | | | - use -width and -offset for lists - some macro cleanup
* mostly ansi cleanup; pval okderaadt2003-06-101-10/+6
|
* - section reorderjmc2003-06-101-12/+12
| | | | | | | | | - COMPATIBILITY merge - macro cleanup - kill whitespace at EOL - new sentence, new line ssh pages ok markus@
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-034-26/+10
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* improve docs; raj@cerias.purdue.eduderaadt2003-02-192-8/+17
|
* bring in prototypesderaadt2002-03-251-2/+3
|
* Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.millert2002-02-162-8/+8
|
* get rid of signal racederaadt2001-11-141-4/+7
|
* Add lots of missing prototypes, constify a few things. Add explicit ints.espie2001-08-183-12/+44
| | | | Makes gcc much happier, less warnings.
* first pass at a -Wall cleanupderaadt2001-07-122-5/+10
|
* Change all option list specifications to ".Bl -tag -width Ds". Most manaaron2000-11-091-2/+2
| | | | | pages just needed their -width parameter tweaked to "Ds", which provides a nice width of 6 constant characters. For consistency more than anything.