From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7810 invoked by alias); 9 Jun 2008 19:03:41 -0000 Received: (qmail 7743 invoked by uid 48); 9 Jun 2008 19:03:02 -0000 Date: Mon, 09 Jun 2008 22:17:00 -0000 From: "fche at redhat dot com" To: systemtap@sources.redhat.com Message-ID: <20080609190302.6611.fche@redhat.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug translator/6611] New: read-only variable typo warnings should list alternatives X-Bugzilla-Reason: AssignedTo Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2008-q2/txt/msg00592.txt.bz2 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.