From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24969 invoked by alias); 11 Nov 2008 12:33:38 -0000 Received: (qmail 24868 invoked by uid 22791); 11 Nov 2008 12:33:35 -0000 X-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_73,KAM_MX,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 11 Nov 2008 12:32:59 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id mABCWtJp010486; Tue, 11 Nov 2008 07:32:55 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id mABCWtMl014211; Tue, 11 Nov 2008 07:32:55 -0500 Received: from [10.32.4.23] (vpn-4-23.str.redhat.com [10.32.4.23]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id mABCWpAl026970; Tue, 11 Nov 2008 07:32:53 -0500 Subject: Re: [PATCH] Add function name and file to semantic error messages for not found local variables. From: Mark Wielaard To: =?UTF-8?Q?Przemys=C5=82aw_Pawe=C5=82czyk?= Cc: systemtap@sourceware.org In-Reply-To: <40e92d5b0811110406g204df218m185bb25c653b82b@mail.gmail.com> References: <40e92d5b0811101657r39178ec8ib2fde64e2ba6bfb9@mail.gmail.com> <1226398468.3420.9.camel@dijkstra.wildebeest.org> <40e92d5b0811110406g204df218m185bb25c653b82b@mail.gmail.com> Content-Type: text/plain; charset=utf-8 Date: Tue, 11 Nov 2008 12:33:00 -0000 Message-Id: <1226406771.3420.20.camel@dijkstra.wildebeest.org> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 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-q4/txt/msg00314.txt.bz2 On Tue, 2008-11-11 at 13:06 +0100, Przemysław Pawełczyk wrote: > > In this case we cannot always just print the diename of the scope we are > > looking at since that might be NULL (see just above in the function). In > > that case we are just looking for the scope by address. And while we are > > improving the error message, lets also add the same for the other error > > case just above it. So I think we want something like the attached. Does > > that work for you? > > Yes, I didn't noticed NULL problem and unconsciously omitted second > error message in this function, so your patch is definitely better > (and works, of course). Thanks for testing. Committed as: 2008-11-11 Przemysław Pawełczyk Mark Wielaard * tapsets.cxx (find_variable_and_frame_base): Add scope name to semantic error messages if available. > Here it was a rather silly mistake (because of the precedent code, as > you mentioned), but yet I must say that dataflow in systemtap is > (currently) somewhat cryptic to me (I didn't spend enough time looking > into it and sorry for this). I mean e.g. it's not obvious (to me) > where scope_die in tapsets.cxx is not NULL for sure. However, that is > my problem, no systemtap's. I admit to be confused myself how the precise dataflow is at times. In this case the NULL check just above this call was the hint. The INTERNALS file has some hints. But most information does indeed come from trying to read and track the code by hand. Cheers, Mark