From patchwork Sat Feb 22 20:50:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 38278 Received: (qmail 80386 invoked by alias); 22 Feb 2020 20:51:05 -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 80377 invoked by uid 89); 22 Feb 2020 20:51:05 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.1 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=HX-Languages-Length:2064, agent X-HELO: gateway30.websitewelcome.com Received: from gateway30.websitewelcome.com (HELO gateway30.websitewelcome.com) (50.116.127.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 22 Feb 2020 20:51:02 +0000 Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway30.websitewelcome.com (Postfix) with ESMTP id C75D0C09E for ; Sat, 22 Feb 2020 14:51:00 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id 5bjojypsAAGTX5bjoj8xdr; Sat, 22 Feb 2020 14:51:00 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=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: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=/5gk6CscN0alVqBJmsBMxUj5rjz3HbqGDwGfhLspPdM=; b=BGmZk0XIrxNYPNCb6hwAXTlagy /oixeLbg7i+Mc06ZWTxLXEyA1uFp9cpJ2mw761O68F5p4zn/YUkXrJDvazF3dF8Egk8QY6OmyQHCM rt2YJG7Y/PePqJmAmJVnb9JSq; Received: from 75-166-123-50.hlrn.qwest.net ([75.166.123.50]:40188 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1j5bjo-000dGM-Kb; Sat, 22 Feb 2020 13:51:00 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [pushed] Make dwarf2_compile_expr_to_ax static Date: Sat, 22 Feb 2020 13:50:53 -0700 Message-Id: <20200222205053.31186-1-tom@tromey.com> I noticed that dwarf2_compile_expr_to_ax can be static. Nothing outside of loc.c calls it. gdb/ChangeLog 2020-02-22 Tom Tromey * dwarf2/loc.h (dwarf2_compile_expr_to_ax): Don't declare. * dwarf2/loc.c (dwarf2_compile_expr_to_ax): Now static. --- gdb/ChangeLog | 5 +++++ gdb/dwarf2/loc.c | 2 +- gdb/dwarf2/loc.h | 20 -------------------- 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/gdb/dwarf2/loc.c b/gdb/dwarf2/loc.c index a9523e9f7ee..a5074da8bf1 100644 --- a/gdb/dwarf2/loc.c +++ b/gdb/dwarf2/loc.c @@ -2881,7 +2881,7 @@ get_ax_pc (void *baton) example, if the expression cannot be compiled, or if the expression is invalid. */ -void +static void dwarf2_compile_expr_to_ax (struct agent_expr *expr, struct axs_value *loc, unsigned int addr_size, const gdb_byte *op_ptr, const gdb_byte *op_end, diff --git a/gdb/dwarf2/loc.h b/gdb/dwarf2/loc.h index 8fff663ebf9..4514fa93c7b 100644 --- a/gdb/dwarf2/loc.h +++ b/gdb/dwarf2/loc.h @@ -242,26 +242,6 @@ extern const struct symbol_computed_ops dwarf2_loclist_funcs; extern const struct symbol_block_ops dwarf2_block_frame_base_locexpr_funcs; extern const struct symbol_block_ops dwarf2_block_frame_base_loclist_funcs; -/* Compile a DWARF location expression to an agent expression. - - EXPR is the agent expression we are building. - LOC is the agent value we modify. - ARCH is the architecture. - ADDR_SIZE is the size of addresses, in bytes. - OP_PTR is the start of the location expression. - OP_END is one past the last byte of the location expression. - - This will throw an exception for various kinds of errors -- for - example, if the expression cannot be compiled, or if the expression - is invalid. */ - -extern void dwarf2_compile_expr_to_ax (struct agent_expr *expr, - struct axs_value *loc, - unsigned int addr_size, - const gdb_byte *op_ptr, - const gdb_byte *op_end, - struct dwarf2_per_cu_data *per_cu); - /* Determined tail calls for constructing virtual tail call frames. */ struct call_site_chain