From patchwork Wed Apr 3 01:37:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 32134 Received: (qmail 26500 invoked by alias); 3 Apr 2019 01:38:10 -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 26446 invoked by uid 89); 3 Apr 2019 01:38:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.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.1 spammy=Tested, rebuilding X-HELO: gateway33.websitewelcome.com Received: from gateway33.websitewelcome.com (HELO gateway33.websitewelcome.com) (192.185.145.190) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 03 Apr 2019 01:38:08 +0000 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway33.websitewelcome.com (Postfix) with ESMTP id 72840149CF9 for ; Tue, 2 Apr 2019 20:38:07 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id BUqthLw3L2PzOBUqthxfnt; Tue, 02 Apr 2019 20:38:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=KECpXF0S5mhI/jSk2kzApsMXsK8aGPDq0PcST/y/QeM=; b=OvtUFRAL5nZ5XRqtCDt262/Z64 ZYfKVkRX8RfZ0sXcNfuBb+96AB0LBhs3v8LUvKT1qjgEErylEic6W4jaKLyI5Vpifhur7KpOvD7Z3 yhTfR/vTzHqHzL14vXtNXnzo6; Received: from 174-29-37-56.hlrn.qwest.net ([174.29.37.56]:34720 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1hBUqt-002Gj6-4y; Tue, 02 Apr 2019 20:38:07 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 01/13] Make increase_expout_size static Date: Tue, 2 Apr 2019 19:37:53 -0600 Message-Id: <20190403013805.11978-2-tom@tromey.com> In-Reply-To: <20190403013805.11978-1-tom@tromey.com> References: <20190403013805.11978-1-tom@tromey.com> increase_expout_size is only called from parse.c, and probably only should be. This makes it "static". Tested by rebuilding. gdb/ChangeLog 2019-04-02 Tom Tromey * parser-defs.h (increase_expout_size): Don't declare. * parse.c (increase_expout_size): Now static. --- gdb/ChangeLog | 5 +++++ gdb/parse.c | 9 +++++++-- gdb/parser-defs.h | 6 ------ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/gdb/parse.c b/gdb/parse.c index 63cbc746aaa..671659742dd 100644 --- a/gdb/parse.c +++ b/gdb/parse.c @@ -119,6 +119,9 @@ static expression_up parse_exp_in_context (const char **, CORE_ADDR, int, int *, innermost_block_tracker_types); +static void increase_expout_size (struct parser_state *ps, size_t lenelt); + + /* Documented at it's declaration. */ void @@ -1822,9 +1825,11 @@ exp_uses_objfile (struct expression *exp, struct objfile *objfile) return exp_iterate (exp, exp_uses_objfile_iter, objfile); } -/* See definition in parser-defs.h. */ +/* Reallocate the `expout' pointer inside PS so that it can accommodate + at least LENELT expression elements. This function does nothing if + there is enough room for the elements. */ -void +static void increase_expout_size (struct parser_state *ps, size_t lenelt) { if ((ps->expout_ptr + lenelt) >= ps->expout_size) diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h index 26e0a836c11..bb0d52bb05c 100644 --- a/gdb/parser-defs.h +++ b/gdb/parser-defs.h @@ -426,11 +426,5 @@ extern int exp_uses_objfile (struct expression *exp, struct objfile *objfile); extern void mark_completion_tag (enum type_code, const char *ptr, int length); -/* Reallocate the `expout' pointer inside PS so that it can accommodate - at least LENELT expression elements. This function does nothing if - there is enough room for the elements. */ - -extern void increase_expout_size (struct parser_state *ps, size_t lenelt); - #endif /* PARSER_DEFS_H */