This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug tapsets/17741] try-catch statement as a tapset function
- From: "jistone at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Fri, 26 Dec 2014 21:34:58 +0000
- Subject: [Bug tapsets/17741] try-catch statement as a tapset function
- Auto-submitted: auto-generated
- References: <bug-17741-6586 at http dot sourceware dot org/bugzilla/>
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.