From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32173 invoked by alias); 29 Sep 2008 16:57:56 -0000 Received: (qmail 32164 invoked by uid 22791); 29 Sep 2008 16:57:56 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 29 Sep 2008 16:57:16 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id EDA6F1EEA94; Mon, 29 Sep 2008 12:57:14 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id oYOAR3GJmP+9; Mon, 29 Sep 2008 12:57:14 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id B8CC71EEA92; Mon, 29 Sep 2008 12:57:14 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id A9DF8E7ACD; Mon, 29 Sep 2008 09:57:12 -0700 (PDT) Date: Mon, 29 Sep 2008 16:57:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: PR gdb/856 Message-ID: <20080929165712.GA3811@adacore.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i 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/msg00556.txt.bz2 :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... -- Joel