From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 62501 invoked by alias); 2 Oct 2019 15:51:37 -0000 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 Received: (qmail 62186 invoked by uid 89); 2 Oct 2019 15:51:37 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=scary X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 02 Oct 2019 15:51:36 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 8ED16117C4D; Wed, 2 Oct 2019 11:51:34 -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 a-yWJVALzC83; Wed, 2 Oct 2019 11:51:34 -0400 (EDT) Received: from murgatroyd (75-166-72-156.hlrn.qwest.net [75.166.72.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id 064D9117C5A; Wed, 2 Oct 2019 11:51:33 -0400 (EDT) From: Tom Tromey To: Andrew Burgess Cc: Christian Biesinger , Tom Tromey , gdb-patches Subject: Re: [PATCH v2 2/8] Search global block from basic_lookup_symbol_nonlocal References: <20190920192017.15293-1-tromey@adacore.com> <20190920192017.15293-3-tromey@adacore.com> <20190923141655.GH4962@embecosm.com> Date: Wed, 02 Oct 2019 15:51:00 -0000 In-Reply-To: <20190923141655.GH4962@embecosm.com> (Andrew Burgess's message of "Mon, 23 Sep 2019 15:16:55 +0100") Message-ID: <87imp7ywl6.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-10/txt/msg00065.txt.bz2 >>>>> "Andrew" == Andrew Burgess writes: Andrew> I think my conclusion is that you're right, but, refactoring this code Andrew> to have lookup_static_symbol call lookup_symbol_in_static_block (or Andrew> equivalent in all cases) seems a pretty scary change. I'd ideally Andrew> like to see that refactoring separated from this patch series. I think it would be better on the whole to have much simpler symbol lookup functions, and then put the complicated parts (like "this" searching or iteration over static blocks) into the per-language parser or evaluation code. Maybe that's too big a job to contemplate though. Andrew> My vote would be to merge this, and then, possibly we can look at Andrew> reworking symbol lookup inline with your suggestion. What do you Andrew> think? I am going to go ahead and do this now. Tom