btrace(8): allow empty statements in probes.
authordv <dv@openbsd.org>
Sat, 2 Sep 2023 19:28:46 +0000 (19:28 +0000)
committerdv <dv@openbsd.org>
Sat, 2 Sep 2023 19:28:46 +0000 (19:28 +0000)
commite817eab93a21b67f02b737b37322f820c9496c38
tree11cd57a6e6c4b30b62d8a5028260f57032656dfe
parent705c0eb9fc946a90eca4826e53d0efa2d1bca893
btrace(8): allow empty statements in probes.

Allows for probes like `BEGIN {}`, in parity with bpftrace.

Also fixes an incorrect syntax error parsing argN builtins in
subsequent probes after an empty BEGIN block.

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