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]

$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



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