This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/6611] New: read-only variable typo warnings should list alternatives
- From: "fche at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 9 Jun 2008 19:03:02 -0000
- Subject: [Bug translator/6611] New: read-only variable typo warnings should list alternatives
- Reply-to: sourceware-bugzilla at sourceware dot org
The same way as we list alternatives when someone
misspells a $context variable, we should do the same
when eliding a read-only variable:
probe foo = bar { var1="foo" }
probe foo { prinln(var) } # <- should list "var1" as an alternative
Then one can *list* local variables available in a probe using
a hack like
% stap -e "probe SOMEWHERE { nosuchvar }"
WARNING: read-only local variable nosuchvar (alternatives: foo, bar, baz) ...
(It's conceivable to also warn for the "var1" side of the
mismatch, in the "eliding unused local variable" branch in
elaborate.cxx:semantic_pass_opt2.)
--
Summary: read-only variable typo warnings should list
alternatives
Product: systemtap
Version: unspecified
Status: NEW
Severity: enhancement
Priority: P2
Component: translator
AssignedTo: systemtap at sources dot redhat dot com
ReportedBy: fche at redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=6611
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.