[Bug tapsets/17741] try-catch statement as a tapset function
jistone at redhat dot com
sourceware-bugzilla@sourceware.org
Fri Dec 26 21:35:00 GMT 2014
https://sourceware.org/bugzilla/show_bug.cgi?id=17741
Josh Stone <jistone at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jistone at redhat dot com
--- Comment #1 from Josh Stone <jistone at redhat dot com> ---
Note that both arguments will be evaluated *before* the function is called, so
if the first throws, your try_catch() won't even get a chance to catch it. You
would need lambdas to let the function wrap a try-catch around evaluation.
A macro @try_catch can almost fake this, but since try-catch is a statement,
not an expression, it can't have a value. And we don't have anything like
({...}) expressions to wrap up statements as expressions.
How about @try_assign(part_1, "k:".modname(addr()), sprintf("k:%p",addr())) ?
This would expand exactly like your "wordy" example.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Systemtap
mailing list