From patchwork Tue Jan 2 15:31:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 25177 Received: (qmail 46398 invoked by alias); 2 Jan 2018 15:31:56 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 46378 invoked by uid 89); 2 Jan 2018 15:31:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:U*donb, H*Ad:D*embecosm.com, H*Ad:U*andrew.burgess X-HELO: mail-wm0-f68.google.com Received: from mail-wm0-f68.google.com (HELO mail-wm0-f68.google.com) (74.125.82.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 02 Jan 2018 15:31:54 +0000 Received: by mail-wm0-f68.google.com with SMTP id 9so61726448wme.4 for ; Tue, 02 Jan 2018 07:31:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=Bn/nb1BoVN1EZcbBJYksM4Xb1B7Er/LBvDgci+4wgXQ=; b=QteXPFHQD1yS0Oqb7e5gjeiWxUjVjrrJo6Cto0Nl7ELp3U1vOJCuHg6l1vsFRdZFNU XJvnV/L8cZSugRtllR4IA34oGJ33VUkMBTfZYFmKS2PsgbauI+EkJoCmHoYaeB23T01G hjqCGUITsvPQqzuip2CTrfY+vYLSflVruaUg4FIXMm2ZjZ+MNTmEPTpIKMfKez99pVUY b7Llqq7n0VdTiVz7JDnydP2Rt6eyikzAG/nX1NylaImMSeYN5t7EW/GMcSujdveBCnWZ otrRfeYck84KFxEDOM+QJ80jkFyPHjkXV0bxa3+1UdQDttdVOx6UIkGjTLgE9JZb/i9W Ufgg== X-Gm-Message-State: AKGB3mLHLp7fVI1vWZeZc/cNqgJvAyQASi9yIDvJ16zeV81IbT2VvscH FAcb1cp/FAYqjM7HwrYWX1JEIfhD X-Google-Smtp-Source: ACJfBovoqYp1YhpWFaqnkgjPvqBH3b1u7mvT323gBM0gIJViO5sfdPMCD+q5bF+p7rT5cFjNEYMirg== X-Received: by 10.28.229.19 with SMTP id c19mr34637854wmh.156.1514907112633; Tue, 02 Jan 2018 07:31:52 -0800 (PST) Received: from localhost ([81.141.199.69]) by smtp.gmail.com with ESMTPSA id k19sm15219467wre.92.2018.01.02.07.31.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jan 2018 07:31:52 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: donb@codesourcery.com, simark@simark.ca, palves@redhat.com, Andrew Burgess Subject: [PATCHv5 1/5] gdb: Remove duplicate declaration of global innermost_block Date: Tue, 2 Jan 2018 15:31:44 +0000 Message-Id: <27fa2eeca60a44538024cfcc51ca8481d0f243dd.1514905848.git.andrew.burgess@embecosm.com> In-Reply-To: References: In-Reply-To: References: X-IsSubscribed: yes The global 'innermost_block' is declared in two header files. Remove one of the declarations, and add an include of the other header into the one source file that could no longer see a declaration of 'innermost_block'. gdb/ChangeLog: * expression.h (innermost_block): Remove declaration. * varobj.c: Add 'parser-defs.h' include. --- gdb/ChangeLog | 5 +++++ gdb/expression.h | 5 ----- gdb/varobj.c | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gdb/expression.h b/gdb/expression.h index a783ea5fef2..030f2f08e7a 100644 --- a/gdb/expression.h +++ b/gdb/expression.h @@ -111,11 +111,6 @@ extern expression_up parse_exp_1 (const char **, CORE_ADDR pc, attempt completion. */ extern int parse_completion; -/* The innermost context required by the stack and register variables - we've encountered so far. To use this, set it to NULL, then call - parse_, then look at it. */ -extern const struct block *innermost_block; - /* From eval.c */ /* Values of NOSIDE argument to eval_subexp. */ diff --git a/gdb/varobj.c b/gdb/varobj.c index 01dabef37c3..701ef663766 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -30,6 +30,7 @@ #include "gdbthread.h" #include "inferior.h" #include "varobj-iter.h" +#include "parser-defs.h" #if HAVE_PYTHON #include "python/python.h"