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 translator/14924] warn on complex $ptr->foo expressions in .return probes


https://sourceware.org/bugzilla/show_bug.cgi?id=14924

--- Comment #6 from Martin Cermak <mcermak at redhat dot com> ---
Created attachment 9619
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9619&action=edit
possible patch

(In reply to Frank Ch. Eigler from comment #4)
> Created attachment 9616 [details]
> possible patch
> 
> A more blunt but not crazy approach, which warns on any
> 
>   probe FOO.return { $var }
> 

So the above would warn whenever the autosaving feature gets used.  What if the
warning message would only pop up in case a dereference is involved within the
expression in question?  Like in $foo->bar->baz per Comment#0 ?  The attached
patch does that.  But of course, it's simply extendable to apply to any target
$var in a .return probe.

Also an "info" output/log level might be introduced as an analogy to "warning"
[session.print_warning()] with an option to turn it off, or make it a regular
warning?  Or maybe better yet, it might be turned off by default with an option
to turn it on on demand - like additional hints if the user wants it.  Just
thoughts.  Too verbose.  Sorry :)

-- 
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]