freebsd-dev/sys
Mark Johnston bdd101c4d4 dtrace: Add a "regs" variable
This allows invop-based providers (i.e., fbt and kinst) to expose the
register file of the CPU at the point where the probe fired.  It does
not work for SDT providers because their probes are implemented as plain
function calls and so don't save registers.  It's not clear what
semantics "regs" should have for them anyway.

This is akin to "uregs", which nominally provides access to the
userspace registers.  In fact, DIF already had a DIF_VAR_REGS variable
defined, it was simply unimplemented.

Usage example: print the contents of %rdi upon each call to
amd64_syscall():

    fbt::amd64_syscall:entry {printf("%x", regs[R_RDI]);}

Note that the R_* constants are defined in /usr/lib/dtrace/regs_x86.d.
Currently there are no similar definitions for non-x86 platforms.

Reviewed by:	christos
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D36799
2022-10-04 13:05:54 -04:00
..
amd64 amd64/db_trace.c: remove stray prototype 2022-10-04 01:50:30 +03:00
arm Teach the GICv3 driver to translate memory ranges 2022-09-23 15:28:45 +01:00
arm64 Clear the indirect flag in the GICv3 ITS driver 2022-10-04 17:14:16 +01:00
bsm
cam cam: Provide compatibility for CAMGETPASSTHRU for periph drivers 2022-09-29 13:14:57 -04:00
cddl dtrace: Add a "regs" variable 2022-10-04 13:05:54 -04:00
compat linuxolator: add netlink support 2022-10-01 14:16:45 +00:00
conf arm64: coresight: fix the build without FDT 2022-09-29 14:33:33 -05:00
contrib zlib crc32: Add prototypes for recently-added static functions. 2022-09-28 14:00:27 -07:00
crypto Fix the IV length in the armv8 AES GCM code 2022-09-06 13:11:04 +01:00
ddb Fix kernel build after 754cb545b6 . 2022-10-04 17:13:17 +02:00
dev Include opt_platform.h to ensure FDT is defined 2022-10-04 17:38:56 +01:00
dts sys/dts: Remove MIPS files 2022-05-20 17:11:27 +01:00
fs cuse(3): Cosmetic change about testing boolean values. 2022-10-04 13:51:06 +02:00
gdb ddb: use _FLAGS command macros where appropriate 2022-07-05 11:56:55 -03:00
geom Adjust g_waitidle() visibility and definition 2022-08-02 21:11:10 +03:00
gnu
i386 ddb: de-duplicate decode_syscall() 2022-10-03 13:49:54 -03:00
isa Adjust function definition in isa's pnp.c to avoid clang 15 warning 2022-07-27 21:13:59 +02:00
kern time(3): Align fast clock times to avoid firing multiple timers. 2022-10-03 17:53:17 +02:00
kgssapi
libkern qdivrem: Predict division by zero as false. 2022-10-04 13:51:06 +02:00
modules linuxolator: add netlink support 2022-10-01 14:16:45 +00:00
net bpf: obtain timestamps from controller via pkthdr if available 2022-10-03 18:53:40 -04:00
net80211 net80211: move IEEE80211_F_WME check to vap for consistency 2022-09-29 12:54:23 +00:00
netgraph Alter the prototype of qsort_r(3) to match POSIX, which adopted the 2022-09-30 15:26:30 -07:00
netinet Fix kernel build after fcb3f813f3 . 2022-10-04 15:55:36 +02:00
netinet6 netinet*: remove PRC_ constants and streamline ICMP processing 2022-10-03 20:53:04 -07:00
netipsec Fix kernel build after fcb3f813f3 . 2022-10-04 15:42:51 +02:00
netlink Fix kernel build after fcb3f813f3 . 2022-10-04 16:08:39 +02:00
netpfil ipfilter: Cast uintmax_t values to size_t when adding to a pointer. 2022-09-28 13:58:34 -07:00
netsmb
nfs nfs: skip bootpc when vfs.root.mountfrom is other than nfs 2022-05-31 16:07:27 -03:00
nfsclient
nfsserver
nlm
ofed ibcore: The use of IN_LOOPBACK() now requires a valid VNET context. 2022-09-23 13:42:03 +02:00
opencrypto opencrypto: mark INVARIANTS variables as __diagused 2022-08-10 15:35:29 -04:00
powerpc powerpc: slb_alloc_user_cache: fix missing uma_zalloc wait flag 2022-10-03 20:56:41 -03:00
riscv riscv: Apply 8d7ee2047c to the riscv pmap 2022-10-04 13:05:54 -04:00
rpc nfsd: Allow multiple instances of rpc.tlsservd 2022-08-22 13:54:24 -07:00
security vfs: introduce V_PCATCH to stop abusing PCATCH 2022-09-17 15:41:37 +00:00
sys time(3): Increase precision of time conversion functions by using gcd. 2022-10-04 13:51:06 +02:00
teken
tests
tools sound(4): Fix order of parameters for custom equalizer band pass filter. 2022-08-22 10:04:26 +02:00
ufs Updates to UFS/FFS superblock integrity checks when reading a superblock. 2022-10-03 05:53:10 -07:00
vm Fix various places which cast a pointer to a vm_paddr_t or vice versa. 2022-10-03 16:10:41 -07:00
x86 Fix various places which cast a pointer to a vm_paddr_t or vice versa. 2022-10-03 16:10:41 -07:00
xdr
xen xenbus: improve device tracking 2022-06-07 12:29:53 +02:00
Makefile