Add support for string comparison in filters.
authormpi <mpi@openbsd.org>
Sat, 12 Nov 2022 14:19:08 +0000 (14:19 +0000)
committermpi <mpi@openbsd.org>
Sat, 12 Nov 2022 14:19:08 +0000 (14:19 +0000)
commit6f84e5f76992f4a42af5fb8fd918abf5b12f73a8
tree6339dff5aed1e804ab213ae9a0dd6db17ca5435a
parent216028eef6b1dd26ceaa0140261c882a9fba67f8
Add support for string comparison in filters.

It is now possible to filter by process name, like:

syscall:mmap:entry
/comm == "ld"/
{
...
}

Currently the parser treats C-string like any other expression member even
if arithmetic operations do no apply to strings.
regress/usr.sbin/btrace/Makefile
regress/usr.sbin/btrace/filters.bt [new file with mode: 0644]
regress/usr.sbin/btrace/filters.ok [new file with mode: 0644]
usr.sbin/btrace/bt_parse.y
usr.sbin/btrace/btrace.c