From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by sourceware.org (Postfix) with ESMTPS id 17027383F850 for ; Tue, 12 May 2020 21:17:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 17027383F850 X-ASG-Debug-ID: 1589318263-0c856e314b8938b0001-fS2M51 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id 4z8Jjv39v8jFQ7TP (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 12 May 2020 17:17:43 -0400 (EDT) X-Barracuda-Envelope-From: simon.marchi@efficios.com X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from epycamd.internal.efficios.com (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) by smtp.ebox.ca (Postfix) with ESMTP id 458C9441B21; Tue, 12 May 2020 17:17:42 -0400 (EDT) From: Simon Marchi X-Barracuda-Effective-Source-IP: 192-222-181-218.qc.cable.ebox.net[192.222.181.218] X-Barracuda-Apparent-Source-IP: 192.222.181.218 X-Barracuda-RBL-IP: 192.222.181.218 To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH v2 32/42] Remove dwarf2_per_cu_data::dwarf2_per_objfile Date: Tue, 12 May 2020 17:17:02 -0400 X-ASG-Orig-Subj: [PATCH v2 32/42] Remove dwarf2_per_cu_data::dwarf2_per_objfile Message-Id: <20200512211712.6543-33-simon.marchi@efficios.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200512210913.5593-1-simon.marchi@efficios.com> References: <20200512210913.5593-1-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: smtp.ebox.ca[96.127.255.82] X-Barracuda-Start-Time: 1589318263 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 6294 X-Virus-Scanned: by bsmtpd at ebox.ca X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.81805 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Spam-Status: No, score=-25.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2020 21:17:45 -0000 Nothing references this field anymore, remove it. gdb/ChangeLog: * dwarf2/read.h (struct dwarf2_per_cu_data): : Remove. * dwarf2/read.c (create_cu_from_index_list): Don't assign dwarf2_per_objfile. (create_signatured_type_table_from_index): Likewise. (create_signatured_type_table_from_debug_names): Likewise. (create_debug_type_hash_table): Likewise. (fill_in_sig_entry_from_dwo_entry): Likewise. (create_type_unit_group): Likewise. (read_comp_units_from_section): Likewise. (create_cus_hash_table): Likewise. --- gdb/dwarf2/read.c | 17 ++++------------- gdb/dwarf2/read.h | 3 --- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 0059e6466e5..ac075396716 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -2499,7 +2499,6 @@ create_cu_from_index_list (struct dwarf2_per_objfile *dwarf2_per_objfile, dwarf2_per_cu_data *the_cu = dwarf2_per_objfile->per_bfd->allocate_per_cu (); the_cu->sect_off = sect_off; the_cu->length = length; - the_cu->dwarf2_per_objfile = dwarf2_per_objfile; the_cu->section = section; the_cu->v.quick = OBSTACK_ZALLOC (&dwarf2_per_objfile->per_bfd->obstack, struct dwarf2_per_cu_quick_data); @@ -2591,7 +2590,6 @@ create_signatured_type_table_from_index sig_type->per_cu.is_debug_types = 1; sig_type->per_cu.section = section; sig_type->per_cu.sect_off = sect_off; - sig_type->per_cu.dwarf2_per_objfile = dwarf2_per_objfile; sig_type->per_cu.v.quick = OBSTACK_ZALLOC (&dwarf2_per_objfile->per_bfd->obstack, struct dwarf2_per_cu_quick_data); @@ -2647,7 +2645,6 @@ create_signatured_type_table_from_debug_names sig_type->per_cu.is_debug_types = 1; sig_type->per_cu.section = section; sig_type->per_cu.sect_off = sect_off; - sig_type->per_cu.dwarf2_per_objfile = dwarf2_per_objfile; sig_type->per_cu.v.quick = OBSTACK_ZALLOC (&dwarf2_per_objfile->per_bfd->obstack, struct dwarf2_per_cu_quick_data); @@ -6299,7 +6296,6 @@ create_debug_type_hash_table (struct dwarf2_per_objfile *dwarf2_per_objfile, sig_type = dwarf2_per_objfile->per_bfd->allocate_signatured_type (); sig_type->signature = header.signature; sig_type->type_offset_in_tu = header.type_cu_offset_in_tu; - sig_type->per_cu.dwarf2_per_objfile = dwarf2_per_objfile; sig_type->per_cu.is_debug_types = 1; sig_type->per_cu.section = section; sig_type->per_cu.sect_off = sect_off; @@ -6465,7 +6461,6 @@ fill_in_sig_entry_from_dwo_entry (struct dwarf2_per_objfile *dwarf2_per_objfile, sig_entry->per_cu.sect_off = dwo_entry->sect_off; sig_entry->per_cu.length = dwo_entry->length; sig_entry->per_cu.reading_dwo_directly = 1; - sig_entry->per_cu.dwarf2_per_objfile = dwarf2_per_objfile; sig_entry->per_cu.per_bfd = per_bfd; sig_entry->type_offset_in_tu = dwo_entry->type_offset_in_tu; sig_entry->dwo_unit = dwo_entry; @@ -7281,7 +7276,6 @@ create_type_unit_group (struct dwarf2_cu *cu, sect_offset line_offset_struct) tu_group = OBSTACK_ZALLOC (&dwarf2_per_objfile->per_bfd->obstack, struct type_unit_group); per_cu = &tu_group->per_cu; - per_cu->dwarf2_per_objfile = dwarf2_per_objfile; per_cu->per_bfd = per_bfd; if (per_bfd->using_index) @@ -8031,7 +8025,6 @@ read_comp_units_from_section (struct dwarf2_per_objfile *dwarf2_per_objfile, this_cu->sect_off = sect_off; this_cu->length = cu_header.length + cu_header.initial_length_size; this_cu->is_dwz = is_dwz; - this_cu->dwarf2_per_objfile = dwarf2_per_objfile; this_cu->section = section; dwarf2_per_objfile->per_bfd->all_comp_units.push_back (this_cu); @@ -11311,7 +11304,6 @@ create_cus_hash_table (struct dwarf2_per_objfile *dwarf2_per_objfile, sect_offset sect_off = (sect_offset) (info_ptr - section.buffer); memset (&per_cu, 0, sizeof (per_cu)); - per_cu.dwarf2_per_objfile = dwarf2_per_objfile; per_cu.per_bfd = per_bfd; per_cu.is_debug_types = 0; per_cu.sect_off = sect_offset (info_ptr - section.buffer); @@ -14373,8 +14365,7 @@ handle_data_member_location (struct die_info *die, struct dwarf2_cu *cu, SET_FIELD_BITPOS (*field, offset * bits_per_byte); else { - struct objfile *objfile - = cu->per_cu->dwarf2_per_objfile->objfile; + struct objfile *objfile = cu->per_objfile->objfile; struct dwarf2_locexpr_baton *dlbaton = XOBNEW (&objfile->objfile_obstack, struct dwarf2_locexpr_baton); @@ -14820,7 +14811,7 @@ add_variant_property (struct field_info *fip, struct type *type, for (int i = 0; i < fip->fields.size (); ++i) offset_map[fip->fields[i].offset] = i; - struct objfile *objfile = cu->per_cu->dwarf2_per_objfile->objfile; + struct objfile *objfile = cu->per_objfile->objfile; gdb::array_view parts = create_variant_parts (&objfile->objfile_obstack, offset_map, fip, fip->variant_parts); @@ -15545,7 +15536,7 @@ handle_variant_part (struct die_info *die, struct type *type, complaint (_("nested DW_TAG_variant_part seen " "- DIE at %s [in module %s]"), sect_offset_str (die->sect_off), - objfile_name (cu->per_cu->dwarf2_per_objfile->objfile)); + objfile_name (cu->per_objfile->objfile)); return; } else @@ -15577,7 +15568,7 @@ handle_variant_part (struct die_info *die, struct type *type, complaint (_("DW_AT_discr does not have DIE reference form" " - DIE at %s [in module %s]"), sect_offset_str (die->sect_off), - objfile_name (cu->per_cu->dwarf2_per_objfile->objfile)); + objfile_name (cu->per_objfile->objfile)); } for (die_info *child_die = die->child; diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h index cc1fd914b6f..0a94036f4e9 100644 --- a/gdb/dwarf2/read.h +++ b/gdb/dwarf2/read.h @@ -419,9 +419,6 @@ struct dwarf2_per_cu_data /* The language of this CU. */ enum language lang; - /* The corresponding dwarf2_per_objfile. */ - struct dwarf2_per_objfile *dwarf2_per_objfile; - /* Backlink to the owner of this. */ dwarf2_per_bfd *per_bfd; -- 2.26.2