public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/6611] New: read-only variable typo warnings should list alternatives
@ 2008-06-09 22:17 fche at redhat dot com
  2008-06-11 15:23 ` [Bug translator/6611] " scox at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: fche at redhat dot com @ 2008-06-09 22:17 UTC (permalink / raw)
  To: systemtap

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug translator/6611] read-only variable typo warnings should list alternatives
  2008-06-09 22:17 [Bug translator/6611] New: read-only variable typo warnings should list alternatives fche at redhat dot com
@ 2008-06-11 15:23 ` scox at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: scox at redhat dot com @ 2008-06-11 15:23 UTC (permalink / raw)
  To: systemtap



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|systemtap at sources dot    |scox at redhat dot com
                   |redhat dot com              |
             Status|NEW                         |ASSIGNED


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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-11 14:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-09 22:17 [Bug translator/6611] New: read-only variable typo warnings should list alternatives fche at redhat dot com
2008-06-11 15:23 ` [Bug translator/6611] " scox at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).