From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11811 invoked by alias); 29 Sep 2008 17:12:33 -0000 Received: (qmail 11544 invoked by uid 22791); 29 Sep 2008 17:12:31 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 29 Sep 2008 17:11:42 +0000 Received: (qmail 2122 invoked from network); 29 Sep 2008 17:11:40 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 29 Sep 2008 17:11:40 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: PR gdb/856 Date: Mon, 29 Sep 2008 17:12:00 -0000 User-Agent: KMail/1.9.9 Cc: Joel Brobecker , Tom Tromey References: <20080929165712.GA3811@adacore.com> In-Reply-To: <20080929165712.GA3811@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809291811.39619.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-09/txt/msg00558.txt.bz2 On Monday 29 September 2008 17:57:12, Joel Brobecker wrote: > :REVIEWMAIL: > > > The PR suggests that parse_exp_1 ought to take a sal instead, so this > > is what I've implemented. I changed any caller with access to a > > relevant sal or PC to use that; otherwise I changed the code to use > > either a sal constructed from the block's location, or an empty sal. > > I am not sure about changing the block argument into a sal, and would > argue that changing it into a PC would be slightly better. Indeed, > apart from the macro-scoping that uses a SAL, all the parse routines > only really need a PC. Using a SAL would force some of the callers > that don't already have one at hand to compute it. > > A nice corolary is that it would simplify your patch quite a bit > by getting rid of the need to: replace expression_context_pc by > expression_context_sal; and define a new function empty_sal. > > Thoughts? Andrew Cagney and Jim Blandy both thought using a SAL > would be a good idea, so the SAL idea does have some weight, but... > Hmmm, this rings a bell about a patch I had forgotten: http://sourceware.org/ml/gdb-patches/2008-05/msg00146.html Daniel's answer is here, but I never got back to it: http://sourceware.org/ml/gdb-patches/2008-06/msg00036.html Just pointing it out to perhaps save someone some time. I haven't looked at Tom's patch. :-/ -- Pedro Alves