btrace(8): prohibit use of argN builtins in BEGIN/END.
authordv <dv@openbsd.org>
Mon, 28 Aug 2023 21:23:46 +0000 (21:23 +0000)
committerdv <dv@openbsd.org>
Mon, 28 Aug 2023 21:23:46 +0000 (21:23 +0000)
commitfe7ae6925862b7fefbeadc5109b8cadc72f70ed9
treecb81737b1ce5a953c31cef94ae70c6c549b8cc81
parenta1744ce2a1c5c8a9c633cb01945266a3b1c4df75
btrace(8): prohibit use of argN builtins in BEGIN/END.

The argN builtins are undefined for BEGIN and END special probes.
Similar to bpftrace, produce an error from the parser.

Adds a regress test, as well.

ok mpi@
regress/usr.sbin/btrace/Makefile
regress/usr.sbin/btrace/beginend-argn.bt [new file with mode: 0644]
regress/usr.sbin/btrace/beginend-argn.ok [new file with mode: 0644]
usr.sbin/btrace/bt_parse.y