void throwone (const token* t)
{
- throw semantic_error (_("Expecting symbol or array index expression"), t);
+ if (t->type == tok_operator && t->content == ".") // guess someone misused . in $foo->bar.baz expression
+ throw semantic_error (_("Expecting symbol or array index expression, try -> instead"), t);
+ else
+ throw semantic_error (_("Expecting symbol or array index expression"), t);
}
};
"syscall"). Wildcard probes may not find a match at all in the
tapsets. Recheck the names using
.IR "stap \-l PROBEPOINT" .
-
+Another common mistake is to use the
+.IR .
+operator instead of the correct
+.IR \->
+when dereferencing context variable subfields or pointers:
+.IR $foo\->bar\->baz
+even if in C one would say
+.IR foo\->bar.baz .
.TP
unavailable context variables