This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tapsets/20136] Use the @const() operator across the tapset scripts.


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]