This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]