From patchwork Wed May 23 04:58:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 27420 Received: (qmail 113587 invoked by alias); 23 May 2018 04:59:08 -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 113284 invoked by uid 89); 23 May 2018 04:59:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No 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_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: gateway30.websitewelcome.com Received: from gateway30.websitewelcome.com (HELO gateway30.websitewelcome.com) (192.185.198.26) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 23 May 2018 04:59:02 +0000 Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway30.websitewelcome.com (Postfix) with ESMTP id 4F38347EC for ; Tue, 22 May 2018 23:59:01 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id LLrZfCizp5CKDLLrZffi8q; Tue, 22 May 2018 23:59:01 -0500 X-Authority-Reason: nr=8 Received: from 174-29-44-154.hlrn.qwest.net ([174.29.44.154]:56108 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1fLLrZ-003S5D-2L; Tue, 22 May 2018 23:59:01 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 09/42] Make context_stack_size static in buildsym.c Date: Tue, 22 May 2018 22:58:18 -0600 Message-Id: <20180523045851.11660-10-tom@tromey.com> In-Reply-To: <20180523045851.11660-1-tom@tromey.com> References: <20180523045851.11660-1-tom@tromey.com> X-BWhitelist: no X-Source-L: No X-Exim-ID: 1fLLrZ-003S5D-2L X-Source-Sender: 174-29-44-154.hlrn.qwest.net (bapiya.Home) [174.29.44.154]:56108 X-Source-Auth: tom+tromey.com X-Email-Count: 10 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes context_stack_size is declared in buildsym.h, but only used in buildsym.c. This makes it static in buildsym.c. gdb/ChangeLog 2018-05-22 Tom Tromey * buildsym.h (context_stack_size): Don't declare. * buildsym.c (context_stack_size): New global. --- gdb/ChangeLog | 5 +++++ gdb/buildsym.c | 4 ++++ gdb/buildsym.h | 4 ---- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/gdb/buildsym.c b/gdb/buildsym.c index 583c294790..85b450383e 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -258,6 +258,10 @@ struct subfile_stack static struct subfile_stack *subfile_stack; +/* Currently allocated size of context stack. */ + +static int context_stack_size; + static void free_buildsym_compunit (void); static int compare_line_numbers (const void *ln1p, const void *ln2p); diff --git a/gdb/buildsym.h b/gdb/buildsym.h index 088c1d790e..191db8ca4f 100644 --- a/gdb/buildsym.h +++ b/gdb/buildsym.h @@ -159,10 +159,6 @@ EXTERN struct context_stack *context_stack; EXTERN int context_stack_depth; -/* Currently allocated size of context stack. */ - -EXTERN int context_stack_size; - /* Non-zero if the context stack is empty. */ #define outermost_context_p() (context_stack_depth == 0)