From patchwork Thu Jan 23 00:56:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 37485 Received: (qmail 80130 invoked by alias); 23 Jan 2020 00:57:31 -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 79799 invoked by uid 89); 23 Jan 2020 00:57:28 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.0 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=H*r:esmtpa, HX-Spam-Relays-External:esmtpa, H*RU:esmtpa X-HELO: gateway31.websitewelcome.com Received: from gateway31.websitewelcome.com (HELO gateway31.websitewelcome.com) (192.185.144.91) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 Jan 2020 00:57:22 +0000 Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway31.websitewelcome.com (Postfix) with ESMTP id CD44D61CED for ; Wed, 22 Jan 2020 18:57:20 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id uQoCizIBbERZguQoCirD90; Wed, 22 Jan 2020 18:57:20 -0600 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=1cyHFvqDJlsY8TKlNPsPQCoQcFYKD09tXMuKuUq0ye8=; b=VkP+BH4u/LfNa89If6vdnSuhbt 2mN72Il7VZxOF8SDMxPgtFdHifetWqRLrySgIkOfoRnGySRzW47TR14+DRiIGoh2Y8VLvpv5dT+d2 LwZ0nxmXCxXJiL5T8znuQmJRW; Received: from 75-166-123-50.hlrn.qwest.net ([75.166.123.50]:40826 helo=bapiya.Home) by box5379.bluehost.com with esmtpa (Exim 4.92) (envelope-from ) id 1iuQoC-004Kis-Lq; Wed, 22 Jan 2020 17:57:20 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 10/38] Remove die_reader_specs::comp_dir Date: Wed, 22 Jan 2020 17:56:42 -0700 Message-Id: <20200123005710.7978-11-tom@tromey.com> In-Reply-To: <20200123005710.7978-1-tom@tromey.com> References: <20200123005710.7978-1-tom@tromey.com> die_reader_specs::comp_dir is assigned but never read; this patch removes it. gdb/ChangeLog 2020-01-22 Tom Tromey * dwarf2read.c (struct die_reader_specs) : Remove. (init_cu_die_reader, read_cutu_die_from_dwo): Update. Change-Id: I9818a2593197a6972cddec23cd2f3dd0ce28f580 --- gdb/ChangeLog | 5 +++++ gdb/dwarf2read.c | 11 ----------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index d5fc8e294f1..99b0551cd5a 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -903,9 +903,6 @@ struct die_reader_specs /* The end of the buffer. */ const gdb_byte *buffer_end; - /* The value of the DW_AT_comp_dir attribute. */ - const char *comp_dir; - /* The abbreviation table to use when reading the DIEs. */ struct abbrev_table *abbrev_table; }; @@ -6921,7 +6918,6 @@ init_cu_die_reader (struct die_reader_specs *reader, reader->die_section = section; reader->buffer = section->buffer; reader->buffer_end = section->buffer + section->size; - reader->comp_dir = NULL; reader->abbrev_table = abbrev_table; } @@ -7103,13 +7099,6 @@ read_cutu_die_from_dwo (struct dwarf2_per_cu_data *this_cu, dump_die (comp_unit_die, dwarf_die_debug); } - /* Save the comp_dir attribute. If there is no DWP file then we'll read - TUs by skipping the stub and going directly to the entry in the DWO file. - However, skipping the stub means we won't get DW_AT_comp_dir, so we have - to get it via circuitous means. Blech. */ - if (comp_dir != NULL) - result_reader->comp_dir = DW_STRING (comp_dir); - /* Skip dummy compilation units. */ if (info_ptr >= begin_info_ptr + dwo_unit->length || peek_abbrev_code (abfd, info_ptr) == 0)