This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
$return in wildcarded void functions
- From: Mike Mason <mmlnx at us dot ibm dot com>
- To: systemtap at sources dot redhat dot com
- Date: Mon, 05 Mar 2007 17:31:07 -0800
- Subject: $return in wildcarded void functions
A co-worker posed this problem... He's debugging code he's not familiar with. He's using wildcarding to probe the entries and exits of all functions in a specific module. The return probe looks something like this:
probe module("uhci_hcd").function("*").return
{
printf ("%s <- %s: %s\n", thread_indent(-2), probefunc(), errno_str($return))
}
The return probe attempts to access $return. For functions defined as void, obviously there is no return value, which causes pass 2 to fail with the following errors:
semantic error: function has no return value: identifier '$return' at usb2:11:85
semantic error: function has no return value: identifier '$return' at usb2:23:85
Is there any way around this problem short of writing a return probe for each function? Is there any way to treat a variable as conditional? That would be a useful feature, especially for wildcarded return probes.
Mike