[Bug translator/6611] New: read-only variable typo warnings should list alternatives

fche at redhat dot com sourceware-bugzilla@sourceware.org
Mon Jun 9 22:17:00 GMT 2008


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.



More information about the Systemtap mailing list