Home | History | Annotate | only in /src/usr.bin/ktruss
History log of /src/usr.bin/ktruss
RevisionDateAuthorComments
 1.34 20-Apr-2024  rillig {usr.,}{s,}bin: replace LINT_SUPPORTED with the standard NOLINT

While here, re-enable lint in those cases where lint was skipped due to
a bug in interpreting abstract types, which was fixed in cgram.y 1.469
from 2023-08-02.
 1.33 03-Jun-2023  lukem bsd.own.mk: rename to CC_WNO_ADDRESS_OF_PACKED_MEMBER

Provide a single variable
CC_WNO_ADDRESS_OF_PACKED_MEMBER
with options for both clang and gcc, to replace
CLANG_NO_ADDR_OF_PACKED_MEMBER
CC_NO_ADDR_OF_PACKED_MEMBER
GCC_NO_ADDR_OF_PACKED_MEMBER

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
 1.32 22-Aug-2021  rillig usr.bin: enable lint checks for most programs in /usr/bin

Previously, lint was only activated for the libraries, but not for the
kernel or userland programs. Activate lint for the programs in /usr/bin
for now, more will follow later.

This only affects builds that set MKLINT=yes.
 1.31 07-Sep-2020  mrg apply GCC_NO_ADDR_OF_PACKED_MEMBER
 1.30 23-Jan-2016  christos Define _KERNTYPES for things that need it.
 1.29 26-Sep-2015  christos Put -Isys after the ioctl Makefile has a chance to add other paths first.
 1.28 14-Dec-2009  christos use .ORDER to avoid race
 1.27 11-Dec-2009  uebayasi Use $GENCMD to generate misc.[ch]. Carefully quote strings.
 1.26 08-Dec-2009  uebayasi Put back the dependency of dump.c agaist misc.h. This is needed because
dump.c includes misc.h but misc.h is generated on-the-fly.

Note that dump.c is out of the makeerrnos.sh -> misc.[ch] generation rule
now. This prevents ktruss from being unnecessarily rebuilt in rescue/.

Pointed out by enami@, thanks!
 1.25 06-Dec-2009  uebayasi Correct the dependency; makeerrnos.sh generates misc.c and misc.h. dump.c
is never involved there. Those dependency has been wrong since Rev. 1.1.
 1.24 16-May-2009  christos fix dependencies.
 1.23 14-Apr-2009  lukem Enable WARNS=4 by default for usr.bin, except for:
awk bdes checknr compile_et error gss hxtool kgetcred kinit
klist ldd less lex locale login m4 man menuc mk_cmds
mklocale msgc openssl rpcgen rpcinfo sdiff spell ssh
string2key telnet tn3270 verify_krb5_conf xlint
 1.22 19-Oct-2008  apb branches: 1.22.4; 1.22.6;
Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.
 1.21 08-Oct-2006  peter WFORMAT is no more...
 1.20 17-Jul-2005  he Make misc.h depend on makeerrnos.sh, to ease UPDATE builds after the
latest change to support WARNS=3.
 1.19 17-Jul-2005  he Make this build with WARNS=3, and enable it.
Renames local variable syscall to syscall_ent to placate -Wshadow,
and adds const to struct field initialized to string literals.
 1.18 10-Jul-2004  tron Add prefix "${PROG}-" to filename of automatically created list of
ioctl names. This makes sure that each program is built with its own
copy even if object directories are not used. This avoids build
failures when two or more make jobs are used in parallel.
 1.17 21-Oct-2003  lukem Rework how MAKEVERBOSE operates:

* Don't bother prefixing commands with a line of ${_MKCMD}\
and instead rely upon "make -s". This is less intrusive on
all the Makefiles than the former. Idea from David Laight.

* Rename the variables use to print messages. The scheme now is:
_MKMSG_FOO Run _MKMSG 'foo'
_MKTARGET_FOO Run _MKMSG_FOO ${.TARGET}
From discussion with Alistair Crooks.
 1.16 19-Oct-2003  lukem support MAKEVERBOSE and use ${HOST_SH}
 1.15 11-Feb-2003  drochner fix typo in comment
 1.14 19-Sep-2002  lukem use NETBSDSRCDIR as appropriate
 1.13 18-Sep-2002  lukem makefile delint. use NETBSDSRCDIR as appropriate
 1.12 27-Aug-2002  lukem Implement MKDYNAMICROOT, which currently defaults to "no", but will
be changed in the future to "yes".

If MKDYNAMICROOT == "no", there is no change from existing behaviour
of a static /bin and /sbin (and a few programs in elsewhere).

If MKDYNAMICROOT == "yes", the following changes occur:
in <bsd.own.mk>:
SHLIBDIR?= /lib
SHLINKDIR?= /lib
in various Makefiles, the following entry is DISABLED.
LDSTATIC?=-static
This results in all programs (except those "standalone" programs built
in sys/arch/*/stand) are linked dynamically, the shared linker is moved
from /usr/libexec to /lib (with a compat symlink), and the shared
libraries used by /bin and /sbin programs are moved from /usr/lib to
/lib (with compat symlinks).
 1.11 02-Dec-2001  jmc Force makeerrnos.sh to be run with sh instead of depending on it being
executable
 1.10 16-Jan-2001  cgd Pass CPP and CPPFLAGS to makerrnos.sh, and use them. Default to cpp and
empty, respectively, if not provided.
 1.9 11-Jan-2001  enami Add dummy dependency so that parallel make won't to make misc.c and misc.h
at the same time.
 1.8 30-Dec-2000  sommerfeld Let src/usr.bin build with recursive parallel make..
- add .WAIT and .NOTPARALLEL in a few places
- change ${MAKE} print-objdir to ${PRINTOBJDIR}
- convert other ad-hoc forms to use ${PRINTOBJDIR}
 1.7 14-Nov-2000  jdolecek back out previous change - this needs to be discussed first at least
 1.6 13-Nov-2000  jdolecek don't link these static; if shared libraries are hosed, these utilities would
surely not save the situation, not help to recover from it
 1.5 11-Oct-2000  is More format string cleanup by sommerfeld.
 1.4 10-Apr-2000  jdolecek branches: 1.4.4;
Convert to use setemul() stuff from kdump. This also fixes mapping to
syscalls names in dump when programs of different emulations are executed.

While here, convert to malloc/realloc power of 2 quantities.
 1.3 28-Jul-1999  enami - remove duplicated setting for LDSTATIC in ktruss/Makefile.
- fix command name in SYNOPSIS section of man page.
- link ktrace man page to ktruss man page.
- add executable and man page for ktruss in distrib sets.
 1.2 12-Jul-1999  mrg - build with obj dirs.
- use .PATH not broken links
- share the make fragment to build "ioctl.c"
- general clean up, RCSID, etc.

this is all happy now AFAICT.
 1.1 12-Jul-1999  darrenr import Makefile and dump.c required for building ktruss.
 1.4.4.1 18-Oct-2000  tv Pullup usr.bin string format fixes [is].
See "cvs log" for explicit revision numbers per file, from sommerfeld.
 1.22.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.22.4.2 19-Oct-2008  apb Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.
 1.22.4.1 19-Oct-2008  apb file Makefile was added on branch christos-time_t on 2008-10-19 22:05:24 +0000
 1.48 01-May-2021  rillig ktruss: fix typo in comment
 1.47 14-Jan-2020  kamil Catch up in ktruss(1) with ptrace descriptive operation names

Switch to dynamic string lists PT_STRINGS and PT_MACHDEP_STRINGS.

Reuse the code and approach from kdump(1).
 1.46 04-Jan-2020  mlelstv check of signal number of was backwards.
 1.45 04-Jan-2020  mlelstv validate signal and errno before trying to print.
 1.44 22-Sep-2019  christos Add a new member to struct vfsstat and grow the unused members
The new member is caled f_mntfromlabel and it is the dkw_wname
of the corresponding wedge. This is now used by df -W to display
the mountpoint name as NAME=
 1.43 03-Jun-2018  kamil branches: 1.43.2;
ktruss: Remove symbol clash with libc

Rename local function wprintf() to xwprintf().
This is needed for installing interceptors in sanitizers.

Sponsored by <The NetBSD Foundation>
 1.42 17-Jul-2012  njoly branches: 1.42.30;
mremap(2) return an pointer just like mmap(2).
 1.41 02-Mar-2012  matt Need to cast to intrptr_t before casting a register_t to void * (since
register_t might be wider than a void *).
 1.40 29-Feb-2012  joerg Cast register_t to void * when printing with %p.
 1.39 01-Feb-2012  dholland branches: 1.39.2;
Change the syscall API for quotas over to the new non-proplib one.

- struct vfs_quotactl_args -> struct quotactl_args
- add sys/stdint.h to sys/quotactl.h for clean userland build
- install sys/quotactl.h in /usr/include
- update set lists for same
- add new marshalling code in libquota
- add new unmarshalling code in vfs_syscalls.c
- discard proplib interpreter code in vfs_quotactl.c
- add dispatching code for the 14 quotactl ops in vfs_quotactl.c
- mark the proplib quotactl syscall obsolete
- add a new syscall number for the new quotactl syscall
- change the name of the syscall to __quotactl()
- remove the decl of the old quotactl from quota/quotaprop.h
- add a decl of the new quotactl to sys/quotactl.h
- update the libc build
- update ktruss
- remove proplib marshalling code from libquota
- update copy of syscall table in gdb ppc sources
- hack rumphijack to accomodate new quotactl name (as I recall,
pooka wanted such a name change to simplify something, but I
don't really see what/how)

This change appears to require a kernel version bump for rumpish
reasons.
 1.38 01-Jul-2011  mrg branches: 1.38.2;
avoid an uninitialised variable warning that shouldn't normally happen
in practise but isn't entirely impossible for the future.
 1.37 06-Mar-2011  bouyer merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
 1.36 24-Jul-2009  njoly branches: 1.36.2;
Delay emulation record output, to be processed after the current
syscall; to avoid picking syscall name from the wrong emulation table.
 1.35 02-May-2009  mlelstv make flushpendq drop only entries for the current thread.
 1.34 02-May-2009  christos PR/41338: Michael van Elst: ktruss mixes filename arguments
Restore call to dumppendq.
 1.33 12-Apr-2009  lukem fix sign-compare issues
 1.32 11-Jan-2009  christos branches: 1.32.2;
merge christos-time_t
 1.31 29-Dec-2008  christos branches: 1.31.2;
revert previous. it was meant for the branch.
 1.30 29-Dec-2008  christos fixes for version 2.
 1.29 21-Jul-2008  lukem branches: 1.29.4; 1.29.8;
Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
 1.28 01-Aug-2007  ad branches: 1.28.10; 1.28.12;
Deal correctly with mulithreaded processes. Among other problems this mixed
up return values for system calls between threads, leading to much confusion.
 1.27 23-Oct-2006  mrg since register_t is sometimes unsigned, cast to (long) to check >= 0.
 1.26 22-Oct-2006  christos don't check the wrong variable for being negative!
 1.25 13-Jul-2006  martin Fix alignement problems for fhandle_t, exposed by gcc4.1.

While touching all vptofh/fhtovp functions, get rid of VFS_MAXFIDSIZ,
version the getfh(2) syscall and explicitly pass the size available in
the filehandle from userland.

Discussed on tech-kern, with lots of help from yamt (thanks!).
 1.24 11-Dec-2005  christos learn about v1 records.
 1.23 19-Aug-2005  christos 64 bit inode changes
 1.22 17-Jul-2005  he Make this build with WARNS=3, and enable it.
Renames local variable syscall to syscall_ent to placate -Wshadow,
and adds const to struct field initialized to string literals.
 1.21 17-Jul-2005  he Follow up the constification of ioctlname() in ktrace.h.
 1.20 21-Apr-2004  christos Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
 1.19 27-Feb-2004  enami We can't access array[sizeof(array) / sizeof(array[0])].
 1.18 26-Feb-2004  enami Rototill for less confusing output, especially when multiple processes
are traced and blocking operation is involved (previously, some system
call isn't displayed or displayed as if it is issued by other process).
 1.17 19-Nov-2003  gson Make ktruss compile again after recent change to kdump/setemul.h.
 1.16 23-Sep-2003  matt SYS___sigaction14 -> SYS_compat_16___sigaction14
 1.15 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.
 1.14 16-Mar-2003  jdolecek we really don't need to print random stack garbage on the end of dump
 1.13 16-Mar-2003  jdolecek constify ptrace_ops[]
 1.12 06-Jun-2002  enami Add more syscalls which has pathname as its first argument.
 1.11 13-Nov-2000  jdolecek branches: 1.11.2;
constify, remove redundant dumpfile() prototype
 1.10 12-Oct-2000  is Format string cleanups
 1.9 10-Apr-2000  jdolecek branches: 1.9.4;
Convert to use setemul() stuff from kdump. This also fixes mapping to
syscalls names in dump when programs of different emulations are executed.

While here, convert to malloc/realloc power of 2 quantities.
 1.8 27-Mar-2000  kleink Cast timeval members to types we know the printf conversions of.
 1.7 26-Jan-2000  sommerfeld Fix some obvious bogons; still doesn't seem to work quite right, though.
 1.6 06-Aug-1999  thorpej Don't truncate syscall return values on LP64 platforms.
 1.5 29-Jul-1999  enami call clearerr for the right file pointer.
 1.4 28-Jul-1999  darrenr fix an error where we attempt to bcopy to a long's value rather than address
 1.3 23-Jul-1999  itohy Fix memory-related problems.
Other problems remain, though....
 1.2 12-Jul-1999  mrg - build with obj dirs.
- use .PATH not broken links
- share the make fragment to build "ioctl.c"
- general clean up, RCSID, etc.

this is all happy now AFAICT.
 1.1 12-Jul-1999  darrenr import Makefile and dump.c required for building ktruss.
 1.9.4.1 18-Oct-2000  tv Pullup usr.bin string format fixes [is].
See "cvs log" for explicit revision numbers per file, from sommerfeld.
 1.11.2.1 07-Jun-2002  thorpej pullup-1-6 ticket #191:

basesrc/usr.bin/ktruss/dump.c 1.12

Original log message:

Add more syscalls which has pathname as its first argument.
 1.28.12.2 01-Aug-2007  ad Deal correctly with mulithreaded processes. Among other problems this mixed
up return values for system calls between threads, leading to much confusion.
 1.28.12.1 01-Aug-2007  ad file dump.c was added on branch matt-mips64 on 2007-08-01 21:39:37 +0000
 1.28.10.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.29.8.1 21-Apr-2010  matt sync to netbsd-5
 1.29.4.2 21-Jun-2009  snj Pull up following revision(s) (requested by mlelstv in ticket #824):
usr.bin/ktruss/dump.c: revision 1.35
make flushpendq drop only entries for the current thread.
 1.29.4.1 21-Jun-2009  snj Pull up following revision(s) (requested by mlelstv in ticket #824):
usr.bin/ktruss/dump.c: revision 1.34
PR/41338: Michael van Elst: ktruss mixes filename arguments
Restore call to dumppendq.
 1.31.2.2 29-Dec-2008  christos bring version 2 changes to the branch.
 1.31.2.1 29-Dec-2008  christos file dump.c was added on branch christos-time_t on 2008-12-29 21:31:39 +0000
 1.32.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.36.2.1 08-Feb-2011  bouyer Update for quotactl rename
 1.38.2.2 30-Oct-2012  yamt sync with head
 1.38.2.1 17-Apr-2012  yamt sync with head
 1.39.2.2 08-Mar-2012  riz Pull up following revision(s) (requested by matt in ticket #99):
usr.bin/ktruss/dump.c: revision 1.41
Need to cast to intrptr_t before casting a register_t to void * (since
register_t might be wider than a void *).
 1.39.2.1 05-Mar-2012  sborrill Pull up the following revisions(s) (requested by joerg in ticket #75):
usr.sbin/cpuctl/arch/i386.c: revision 1.28
usr.bin/unifdef/unifdef.c: revision 1.21
usr.bin/ktruss/dump.c: revision 1.40
usr.bin/error/error.h: revision 1.19
usr.bin/error/touch.c: revision 1.27
libexec/httpd/dir-index-bozo.c: revision 1.14
games/dab/algor.cc: revision 1.5
games/dab/board.h: revision 1.4
dist/pf/sbin/pflogd/pflogd.c: revision 1.9
dist/pf/sbin/pflogd/pflogd.h: revision 1.5

Fix various format string mismatches
 1.42.30.1 25-Jun-2018  pgoyette Sync with HEAD
 1.43.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.43.2.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.2 12-Jul-1999  mrg - build with obj dirs.
- use .PATH not broken links
- share the make fragment to build "ioctl.c"
- general clean up, RCSID, etc.

this is all happy now AFAICT.
 1.1 12-Jul-1999  darrenr import Makefile and dump.c required for building ktruss.
 1.7 06-May-2019  kamil Add support for SIGRTMIN+1..SIGRTMAX-1 signals in ktruss(1)

Generate misc.c and misc.h with entries for signals between SIGRTMIN+1
and SIGRTMAX-1.
 1.6 12-Mar-2012  dyoung branches: 1.6.32;
Use 'sort -n -k 3' instead of 'sort -n +2' since the former is more
portable. The latter is not supported by Mac OS X Lion.
 1.5 19-Oct-2008  apb branches: 1.5.2; 1.5.4; 1.5.8; 1.5.12; 1.5.20; 1.5.22;
In shell scripts invoked during a build, and in crunchgen, use ${AWK}
instead of plain "awk". The Makefiles that invoke these scripts
or programs will pass AWK=${HOST_AWK:Q}.
 1.4 17-Jul-2005  he Make this build with WARNS=3, and enable it.
Renames local variable syscall to syscall_ent to placate -Wshadow,
and adds const to struct field initialized to string literals.
 1.3 18-Feb-2001  kim Use the errno.h and signal.h passed in on the command line.
 1.2 16-Jan-2001  cgd Pass CPP and CPPFLAGS to makerrnos.sh, and use them. Default to cpp and
empty, respectively, if not provided.
 1.1 12-Jul-1999  mrg - build with obj dirs.
- use .PATH not broken links
- share the make fragment to build "ioctl.c"
- general clean up, RCSID, etc.

this is all happy now AFAICT.
 1.5.22.1 17-Mar-2012  bouyer Pull up following revision(s) (requested by dyoung in ticket #115):
usr.bin/ktruss/makeerrnos.sh: revision 1.6
Use 'sort -n -k 3' instead of 'sort -n +2' since the former is more
portable. The latter is not supported by Mac OS X Lion.
 1.5.20.1 17-Apr-2012  yamt sync with head
 1.5.12.1 17-Mar-2012  bouyer Pull up following revision(s) (requested by dyoung in ticket #1742):
usr.bin/ktruss/makeerrnos.sh: revision 1.6
Use 'sort -n -k 3' instead of 'sort -n +2' since the former is more
portable. The latter is not supported by Mac OS X Lion.
 1.5.8.1 17-Mar-2012  bouyer Pull up following revision(s) (requested by dyoung in ticket #1742):
usr.bin/ktruss/makeerrnos.sh: revision 1.6
Use 'sort -n -k 3' instead of 'sort -n +2' since the former is more
portable. The latter is not supported by Mac OS X Lion.
 1.5.4.2 19-Oct-2008  apb In shell scripts invoked during a build, and in crunchgen, use ${AWK}
instead of plain "awk". The Makefiles that invoke these scripts
or programs will pass AWK=${HOST_AWK:Q}.
 1.5.4.1 19-Oct-2008  apb file makeerrnos.sh was added on branch christos-time_t on 2008-10-19 22:10:06 +0000
 1.5.2.1 17-Mar-2012  bouyer Pull up following revision(s) (requested by dyoung in ticket #1742):
usr.bin/ktruss/makeerrnos.sh: revision 1.6
Use 'sort -n -k 3' instead of 'sort -n +2' since the former is more
portable. The latter is not supported by Mac OS X Lion.
 1.6.32.1 10-Jun-2019  christos Sync with HEAD

RSS XML Feed