CVSROOT: /cvs Module name: src Changes by: d...@cvs.openbsd.org 2021/09/08 07:29:51
Modified files: usr.sbin/btrace: TODO bt_parse.y bt_parser.h btrace.8 btrace.c Added files: regress/usr.sbin/btrace: staticv.args staticv.bt staticv.ok Log message: btrace(8): add initial support for cli arguments This adds initial support for passing cli args to btrace(8) for use in bt(5) scripts. Similar to bpftrace, they are referenced via $1, $2, etc. with $# being the number of command line arguments provided. Adds an initial regress test and a Makefile change to allow providing arguments to regress tests in a .args file. Currently no limit is imposed on the number of arguments, keeping a similar approach as observed in bpftrace. References to undefined arguments result in a new "nil" type that contextually acts as a zero or empty string. More work can be done here to improve bpftrace compatibility. ok mpi@, jasper@