This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug tapsets/20136] Use the @const() operator across the tapset scripts.
- From: "mcermak at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Thu, 26 May 2016 09:15:46 +0000
- Subject: [Bug tapsets/20136] Use the @const() operator across the tapset scripts.
- Auto-submitted: auto-generated
- References: <bug-20136-6586 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=20136
--- Comment #4 from Martin Cermak <mcermak at redhat dot com> ---
Created attachment 9287
--> https://sourceware.org/bugzilla/attachment.cgi?id=9287&action=edit
proposed patch
Attached simple patch helps in case the constant isn't being used inside of a
macro. It's implemented very similarly to how macros parsing is implemented,
and macros can't be nested. But it's very handy to be able to do something
like this:
@__syscall_compat_gate(@const("__NR_open"), @const("__NR_compat_open"))
So I think, if we want to go this "parser-only" way, we'll need to process
constants separately before processing macros.
Note that the problem of the previous implementation was of a corner case
nature I think. Whole the testsuite passed with it except of the mentioned
pretty-printer case.
Having said all that, I am wondering which of the two approaches is the right
one.
--
You are receiving this mail because:
You are the assignee for the bug.