public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* $return in wildcarded void functions
@ 2007-03-06  1:31 Mike Mason
  2007-03-06  2:21 ` Vara Prasad
                   ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: Mike Mason @ 2007-03-06  1:31 UTC (permalink / raw)
  To: systemtap

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


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2007-03-21 20:46 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-06  1:31 $return in wildcarded void functions Mike Mason
2007-03-06  2:21 ` Vara Prasad
2007-03-06 17:06   ` Jim Keniston
2007-03-07 15:43     ` John Liang
2007-03-06  5:41 ` Frank Ch. Eigler
2007-03-06 19:34   ` Mike Mason
2007-03-06 21:30     ` Frank Ch. Eigler
2007-03-06 22:05       ` Mike Mason
2007-03-06 22:10         ` Frank Ch. Eigler
2007-03-06 22:25           ` Mike Mason
2007-03-07 17:05       ` David Smith
2007-03-07 17:35         ` Frank Ch. Eigler
2007-03-07 18:19           ` David Smith
2007-03-07 19:15             ` Frank Ch. Eigler
2007-03-07 21:24               ` Stone, Joshua I
2007-03-09 15:33                 ` NFS probes with redhat 4 update 3/4 John Liang
2007-03-09 16:42                   ` David Smith
2007-03-09 19:32                     ` Tom Burns
2007-03-12 14:28                       ` backwards compability of systemtap John Liang
2007-03-12 15:25                         ` Frank Ch. Eigler
2007-03-12 15:33                         ` David Smith
2007-03-20 14:26                         ` systemtap crashed the kernel John Liang
2007-03-20 14:49                           ` Frank Ch. Eigler
2007-03-21 20:22                             ` John Liang
2007-03-21 20:46                               ` Frank Ch. Eigler
2007-03-12 14:14                     ` NFS probes with redhat 4 update 3/4 John Liang
2007-03-07 16:35 ` $return in wildcarded void functions John Liang
2007-03-07 17:11   ` David Smith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).