I've thought about it a while, and it seems easiest as well as fairly
general to support markup of the $variable use itself. Since more
elaborate script code may want to substitute a missing $value, and
also know that such a substitution has been done, we'd probably need
two variables:
# probe module("uhci_hcd").function("*").return
# {
# if ($?return)
# printf ("%s <- %s: %s\n", thread_indent(-2), probefunc(), errno_str($!return))
# else
# printf ("%s <- %s: void\n", thread_indent(-2), probefunc())
# }
So $?var would return true or false if the given expression was
defined. And $!var would return the value, if defined, or else fall
back to 0. (This could also cover a fault being encountered while
$!var->field->array[99] pointer chains were gbeing followed.)
So:
$?var==0 implies $!var==0
$?var==0 implies $var would have caused compile-time error
$?var==1 implies $!var equals what $var would have