Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Mar 2023 19:14:25 +0000
From:      bugzilla-noreply@freebsd.org
To:        dtrace@FreeBSD.org
Subject:   [Bug 269906] dtrace requires empty expression to print anything from matching search
Message-ID:  <bug-269906-32976-TLmhN1esIS@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-269906-32976@https.bugs.freebsd.org/bugzilla/>
References:  <bug-269906-32976@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D269906

--- Comment #5 from Christos Margiolis <christos@margiolis.net> ---
Apparently, this patch doesn't really work and, in fact, allowing a predica=
te
with no acts is probably impossible in D without introducing a significant
amount of complexity. awk can do that just fine because awk's predicates ca=
nnot
contain unescaped "/", since it searches for regexes. D on the other hand
allows normal computation inside the predicate, meaning one can do division
inside it:

kinst::vm_fault: /(cpu / 2) =3D=3D 1/


This is a problem because the D lexer considers "/" to be a division token =
(and
not a start/end of predicate token) when the next non-whitespace character
coming after it is anything other than EOF, 0, ;, { and }, so if we try and
run:

kinst::vm_fault: /cpu =3D=3D 1/ fbt::malloc:entry

The lexer will think the end of predicate is actually a division token beca=
use
the succeeding non-whitespace character "f" doesn't match the character set
that indicate the end of predicate.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-269906-32976-TLmhN1esIS>