freebsd-src/usr.sbin
Mark Johnston ea675a43f0 libexec/kgdb: Add new modules and install them together with debug info
This change simplifies integration of gdb python scripts with our kernel
debugging infrastructure.  Rather than putting debugging scripts in
/usr/libexec/kgdb, move them to <path-to-kernel-debug-symbols>/gdb, and
add a kernel-gdb.py which automatically loads modules from that
directory.  kernel-gdb.py will be automatically executed by kgdb when
loading kernel debug symbols (assuming a default configuration), so one
no longer needs to do anything to use these modules.

The change also adds a couple of new modules, vnet.py and pcpu.py, for
conveniently accessing VNET symbols and PCPU/DPCPU fields, respectively.
Note that these require a change to the kernel linker when accessing
symbols from a loadable kernel module.

sys/tools/gdb/README.txt describes the scheme in more detail and
provides some rudiementary documentation for the commands and functions
added by these modules.  It should be updated when adding new features.

sys/tools/gdb/selftest.py can be used to do some primitive testing of
the modules.  All it does is execute a number of gdb commands making use
of commands and functions added by these modules.  The developer is
expected to verify that the commands complete without errors and that
the output looks sane.

Discussed with:	kp, avg, jhb, glebius
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D50825
2025-10-03 14:32:09 +00:00
..
ac Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
accton Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
acpi acpidump: do not use pointer arithmetic to check for overflow 2025-02-26 07:27:32 +02:00
adduser rmuser.sh: Improve prompt consistency with adduser 2025-09-10 20:43:37 -04:00
apm Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
apmd Update Makefile.depend files 2024-10-14 10:26:17 -07:00
arp manpages: prefer linking to xo_options.7 over xo_parse_args.3 2025-07-16 12:02:24 -06:00
audit package: move OpenBSM auditing into its own package 2024-04-28 22:33:06 -06:00
auditd package: move OpenBSM auditing into its own package 2024-04-28 22:33:06 -06:00
auditdistd package: move OpenBSM auditing into its own package 2024-04-28 22:33:06 -06:00
auditreduce package: move OpenBSM auditing into its own package 2024-04-28 22:33:06 -06:00
authpf Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
autofs autofs: partial is also leaked. 2025-08-12 14:35:35 -06:00
bhyve bhyve: assign a valid INTPIN to NVIDIA GPUs 2025-09-16 08:55:09 +02:00
bhyvectl bhyvectl.8: Polish 2025-05-21 12:33:37 -04:00
bhyveload Update Makefile.depend files 2024-10-14 10:26:17 -07:00
binmiscctl manuals: Fix typos in -offset for .Bd and .Bl 2024-10-03 14:49:31 -03:00
blacklistctl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
blacklistd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
bluetooth rtlbtfw.8: Fix typo 2025-08-06 11:28:31 -04:00
boot0cfg Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
bootparamd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
boottrace spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
bsdconfig bsdconfig: Move to -bsdconfig package 2025-08-04 00:13:03 +01:00
bsdinstall bsdinstall/pkgbase: Restore the kernel-dbg component 2025-10-02 02:37:35 +01:00
bsnmpd bsnmpd: Fix an error message 2025-08-02 01:11:56 +02:00
btxld Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
camdd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
cdcontrol Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
certctl certctl: Include sys/types.h 2025-09-09 13:47:42 +00:00
chkgrp Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
chown move ch{own,grp}(8) and tee(1) to FreeBSD-runtime 2025-05-28 02:16:30 +01:00
chroot kern: fix setgroups(2) and getgroups(2) to match other platforms 2025-08-14 23:06:09 -05:00
ckdist Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
clear_locks Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
config config.5: Bump .Dd to reflect latest update 2025-06-16 14:59:08 -04:00
cpucontrol cpucontrol: return selected revision from ucode_amd_find() 2025-09-18 08:11:03 -07:00
crashinfo libexec/kgdb: Add new modules and install them together with debug info 2025-10-03 14:32:09 +00:00
cron cron: Fix comment from "root's" to "system" crontab 2025-09-13 00:38:48 +00:00
crunch shar: remove from the tree well in advance of the 15.0 release 2025-07-10 12:57:03 -05:00
ctladm ctladm: Use require.kmods for cfiscsi 2025-07-23 10:24:33 -06:00
ctld ctld: Add missing initializers for several class members 2025-09-02 14:40:30 -04:00
cxgbetool cxgbetool(8): Updates for T7 2025-09-29 07:26:01 -07:00
daemon daemon: tests: add a test for missed SIGTERM 2024-11-19 13:51:27 -06:00
dconschat dconschat: Increase WARNS to 2 2024-11-03 15:18:39 -05:00
devctl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
devinfo devinfo.8: Document libxo support 2025-08-29 08:43:45 -04:00
diskinfo Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
dumpcis Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
editmap Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
edquota Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
efibootmgr manuals: Fix "unusual .Xr" warnings with a script 2024-10-15 17:18:14 -03:00
efidp Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
efitable efitable.8: Nits 2025-07-22 16:06:31 -04:00
efivar efivar: Use struct guid_table instead of uuid_table 2025-05-01 11:55:14 -06:00
efiwake Update Makefile.depend files 2024-10-14 10:26:17 -07:00
etcupdate etcupdate: Restrict access to the conflicts directory 2025-01-28 14:23:06 +00:00
extattr Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
extattrctl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
fdcontrol packages: move floppy utilities into a new package 2025-05-15 01:02:52 +01:00
fdformat packages: move floppy utilities into a new package 2025-05-15 01:02:52 +01:00
fdread packages: move floppy utilities into a new package 2025-05-15 01:02:52 +01:00
fdwrite packages: move floppy utilities into a new package 2025-05-15 01:02:52 +01:00
fifolog Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
flowctl Purge more stray embedded $FreeBSD$ strings 2023-09-25 07:54:56 -07:00
freebsd-update freebsd-update: Library ordering 2025-09-23 14:05:27 -07:00
fstyp fstyp: search for file system headers with the largest offset first 2024-12-03 23:45:09 -09:00
ftp-proxy Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
fwcontrol fwcontrol: Allocate full fw_asyreq structures passed to the kernel 2024-07-19 13:09:32 -04:00
fwget fwget: pci: video amd: correct glob matching entries 2025-09-01 07:41:30 +00:00
getfmac getfmac.8: add missing cross-references 2025-07-23 00:02:11 -06:00
getpmac Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
gpioctl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
gssd kgssapi: Fix the kgssapi so that it can use MIT Kerberos 2025-08-07 14:02:32 -07:00
gstat gstat(8): Fix typo in example to filter the results 2025-07-12 08:23:48 -06:00
hyperv Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
i2c manuals: Remove trailing spaces 2024-11-04 11:26:14 -04:00
ifmcstat Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
inetd Remove ftpd(8) 2025-09-29 22:53:34 +01:00
iostat Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
iovctl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ip6addrctl ip6addrctl(8): Teach ip6addrctl to attach and run itself in a jail 2025-01-29 18:00:07 +08:00
ipfwpcap Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
iscsid Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
jail jail: Optionally allow audit session state to be configured in a jail 2025-09-16 15:48:25 +00:00
jexec jail: add jexec -d, to specify a working directory 2025-03-05 02:14:47 -08:00
jls jls: add a -c mode to check for a jail's existence 2025-07-25 22:13:43 -05:00
kbdcontrol kbdcontrol: correct bell frequency for vt(4) 2024-11-01 11:54:40 -04:00
kbdmap Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
kldxref libkldelf: add a private library for kernel/kld-related ELF parsing 2024-10-18 20:20:13 +00:00
lastlogin manpages: prefer linking to xo_options.7 over xo_parse_args.3 2025-07-16 12:02:24 -06:00
lpr kern: fix setgroups(2) and getgroups(2) to match other platforms 2025-08-14 23:06:09 -05:00
lptcontrol Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mailstats Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mailwrapper manuals: Fix "unusual .Xr" warnings with a script 2024-10-15 17:18:14 -03:00
makefs makefs: Calculate indirect block count properly for large files on ffs 2025-08-27 15:18:50 -04:00
makemap Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
manctl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
memcontrol Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mfiutil Replace last few remaining MAN[1-8] with MAN 2025-07-26 12:00:02 +02:00
mixer packages: Add a sound package 2025-10-02 02:37:35 +01:00
mld6query usr.sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
mlx5tool manuals: Misc macro typos 2024-09-21 05:25:15 -06:00
mlxcontrol Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mount_smbfs Move mntopts(3) suppport into libutil 2025-04-22 22:51:42 +01:00
mountd exports.5: Add a paragraph clarifying the use of "V4:" 2025-08-25 18:38:54 -07:00
moused moused(8): Add command line option to restrict interface type 2025-09-21 16:14:48 +03:00
mpsutil mpsutil: Clean up libutil deps 2024-01-24 17:10:24 -05:00
mptable Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mptutil mptutil: Capture CAM errors from bus rescan 2025-02-04 20:54:26 -07:00
mtest Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ndp sys/netinet6: Implement RFC 7217 2025-09-20 14:31:44 +02:00
newsyslog Remove ftpd(8) 2025-09-29 22:53:34 +01:00
nfscbd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
nfsd nfsd, rpcbind: add -P option to support pidfile path 2025-06-09 15:24:07 +00:00
nfsdumpstate Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
nfsrevoke Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
nfsuserd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ngctl ngctl: Fix build without JAIL 2025-09-10 12:00:05 +08:00
nghook Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
nmtree Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
nologin Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
nscd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ntp leap-seconds: Update to leap-seconds.3960835200 from IERS 2025-09-08 15:04:22 -07:00
nvram Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ofwdump Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
pciconf pciconf(8): Dump the correct number of bytes 2025-05-19 12:49:27 -07:00
periodic periodic: move some periodic scripts to their packages 2025-05-15 01:02:52 +01:00
pkg pkg(7): Add support for pkg+ prefix to bootstrap pubkey 2025-09-11 09:03:48 +02:00
pmc libpmc: Move libpmc and utils to a new pmc package 2025-09-23 23:06:33 +01:00
pmcannotate libpmc: Move libpmc and utils to a new pmc package 2025-09-23 23:06:33 +01:00
pmccontrol libpmc: Move libpmc and utils to a new pmc package 2025-09-23 23:06:33 +01:00
pmcstat libpmc: Move libpmc and utils to a new pmc package 2025-09-23 23:06:33 +01:00
pmcstudy libpmc: Move libpmc and utils to a new pmc package 2025-09-23 23:06:33 +01:00
pnfsdscopymr Update Makefile.depend files 2024-10-14 10:26:17 -07:00
pnfsdsfile Update Makefile.depend files 2024-10-14 10:26:17 -07:00
pnfsdskill Update Makefile.depend files 2024-10-14 10:26:17 -07:00
pnpinfo Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
powerd packages: Move powerd to its own package 2025-09-23 23:06:32 +01:00
ppp SPDX: Tag BSD-4.3TAHOE 2025-05-21 12:37:10 -04:00
pppctl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
praliases Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
praudit praudit: correct test case 2024-11-04 08:57:13 -05:00
prometheus_sysctl_exporter Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
pstat Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
pw pw: Add a metalog output mode 2025-09-18 22:42:16 +00:00
pwd_mkdb There's no mkpasswd(8) man page any more. Replace Xr with plain name. 2025-04-19 19:45:16 +02:00
pwm Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
quot Standardize the definition of a UFS dinode. 2025-01-27 17:39:45 -08:00
quotaon Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
rarpd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
repquota Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
rip6query packages: move route(6)d to the rip package 2025-08-07 13:36:59 +01:00
rmt Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
route6d packages: move route(6)d to the rip package 2025-08-07 13:36:59 +01:00
rpc.lockd rpc.lockd: avoid embedding assumptions about cr_groups[0] 2025-07-24 09:59:07 -05:00
rpc.statd rpc.statd: move to nfs package 2025-05-05 16:39:25 +01:00
rpc.tlsclntd rpcsec_tls: cleanup the rpctls_syscall() 2025-02-01 01:00:28 -08:00
rpc.tlsservd rpc.tlsservd: fix on a machine with just one CPU 2025-05-20 19:54:38 -07:00
rpc.umntall Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
rpc.yppasswdd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
rpc.ypupdated Revert "Remove Secure RPC DES authentication" 2025-08-15 17:59:18 +01:00
rpc.ypxfrd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
rpcbind rpcbind: Code cleanup 2025-08-07 03:23:19 +02:00
rrenumd Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
rtadvctl rtadvctl: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0]) 2024-04-28 21:24:46 -06:00
rtadvd rtadvd(8): support PREF64 (RFC 8781) 2024-05-23 14:40:48 -06:00
rtprio Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
rtsold rtsold: Further usage message updates 2025-01-24 14:06:59 +00:00
rwhod base: do a sweep of setgroups() that mean to clear the supplementaries 2025-07-26 01:11:58 -05:00
sa Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
sendmail Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
service service: Add an option to enable debugging 2025-08-03 01:59:26 +02:00
services_mkdb services_mkdb(8): Fix a typo in a source code comment 2025-08-17 09:26:53 +02:00
sesutil manpages: prefer linking to xo_options.7 over xo_parse_args.3 2025-07-16 12:02:24 -06:00
setfib Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
setfmac Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
setpmac Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
smbmsg Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
snapinfo man filesystems: fix xrefs after move to section 4 2024-05-16 10:25:29 -06:00
sndctl packages: Add a sound package 2025-10-02 02:37:35 +01:00
spi Replace last few remaining MAN[1-8] with MAN 2025-07-26 12:00:02 +02:00
spkrtest Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
spray Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
syslogd Remove ftpd(8) 2025-09-29 22:53:34 +01:00
sysrc bsdconfig: Move to -bsdconfig package 2025-08-04 00:13:03 +01:00
tcpdchk Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
tcpdmatch Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
tcpdrop usr.sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
tcpdump tcpdump: don't create unused version.c 2025-09-03 13:12:33 +01:00
tcpsso tcp: remove support for TCPPCAP 2025-03-31 16:55:39 +02:00
tests Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
traceroute SPDX: Tag BSD-4.3TAHOE 2025-05-21 12:37:10 -04:00
traceroute6 traceroute6(8): Stop probing on networks rejected. 2025-06-08 17:21:24 +02:00
trim trim.8: update the manual with references to zpool-trim and fsck_ffs -E 2025-10-01 11:05:54 +07:00
tzsetup tzsetup: correct timezone symlink target 2024-09-30 10:22:34 -04:00
uathload uathload.8: Fix typo 2025-08-06 11:18:59 -04:00
uefisign uefisign.8: fix indent 2025-03-29 17:48:06 -03:00
ugidfw Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
uhsoctl usr.sbin/uhsoctl: correct SIOCDIFADDR calls to use ifreq 2024-07-22 14:58:19 +00:00
unbound local-unbound-setup: If TLS is enabled, use the certificate bundle 2025-08-18 16:31:42 +02:00
usbconfig libusb: add SUPER_PLUS in speed enum. 2025-05-15 20:30:32 +02:00
usbdump Give usbdump a '-u' option for unbuffered output. 2024-10-21 11:21:05 +00:00
utx Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
valectl Update Makefile.depend files 2024-10-14 10:26:17 -07:00
vidcontrol Like for -P et al, state that -deElL are syscons only options. 2025-09-04 21:28:33 +02:00
vigr Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
vipw Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
virtual_oss packages: Add a sound package 2025-10-02 02:37:35 +01:00
wake Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
watch watch.8: Align option list 2025-08-22 16:13:15 -04:00
watchdogd watchdog: Convert to using sbintime_t format 2025-08-14 15:02:46 -04:00
wlandebug Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
wlanstat wlanstat(8): Rename from wlanstats(8) to keep consistency 2025-09-30 11:30:08 +08:00
wpa wpa_supplicant: xref relevant wpa_passphrase(8) 2024-10-15 17:18:02 -03:00
yp_mkdb Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ypbind Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ypldap base: do a sweep of setgroups() that mean to clear the supplementaries 2025-07-26 01:11:58 -05:00
yppoll Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
yppush Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ypserv etc, ypserv: Fix symlink creation for pkgbase 2025-10-02 02:37:35 +01:00
ypset Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
zdump Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
zic Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
zonectl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
zzz Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile virtual_oss: Do not build if WITHOUT_CUSE is set 2025-09-30 19:01:37 +02:00
Makefile.aarch64 bhyvectl: Add arm64 bits and hook it up to the build 2024-05-01 08:33:23 -04:00
Makefile.amd64 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.i386 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.inc Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.powerpc Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.riscv usr.sbin: Gate bhyve/bhyvectl on MK_BHYVE for riscv 2025-06-13 18:56:51 +01:00