From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by sourceware.org (Postfix) with ESMTPS id D1C1A3858C98 for ; Mon, 5 Feb 2024 04:22:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D1C1A3858C98 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D1C1A3858C98 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707106942; cv=none; b=ibhKXKazRz+nBCFfwn18wWFJ6xEoMKQqEnLlarAu5PkJSXi7WQ5iRwotkLO/hmNPJk+pEMOnQkH4V9jW8x6Br2/4zbbR/vReOWgIVCdinEAYdU+eC4r9sx7H3ELv3akcWH36KKnoJMDFRAy8ZR/qu8dVN9AHjoU7UPtLGWdnBaI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707106942; c=relaxed/simple; bh=sdIZwgiSmQSeNsdjFlwnVYVJqlqkUESUCs3vhGwsVP8=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:To:From; b=BF3yBqC5/RIW3FAHz+ijVlxRR9YGy2DIv/9Vn+AonLk4oWCfqTQffMYkgCwyQiZ71eAiVyzgvDezaXxIgOXcuxphitwTZ+xQM7lxoOki3FfGXcIa6egT0i5ReVm23pKT3HhZF61d9AnKnVuix/2KRfmXzP3LnEQM2/r1CHiQjDg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 5BBB521FCB; Mon, 5 Feb 2024 04:22:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1707106939; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KA7h8vOvfSX6ACTF9OddwdPA14npoU1mUKyv2oBG32U=; b=eOads2iOm60H9uU99fFAz/GCI5ZZTSdxk4IVuQ/6IR67VGCInBJ/1hzXOB2I2wqOtJMspW mPR1SPVKCd/rh3/eoHPEl8hWAN+SqXbJt4Ys+yFkxiUEZroytKCtaB5IzG0m3sA2Fy14Zr l683d150SW/08y043fZt5Yf4Zoup96o= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1707106939; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KA7h8vOvfSX6ACTF9OddwdPA14npoU1mUKyv2oBG32U=; b=tfNXtZ3c1AjUC60U2PGHiAZA5hiZnFFWTn2rBT0+AaYHaM55+JfpDdWUzsLZIpDO85D5mS XS+6vtUHlYl6SACg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1707106939; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KA7h8vOvfSX6ACTF9OddwdPA14npoU1mUKyv2oBG32U=; b=eOads2iOm60H9uU99fFAz/GCI5ZZTSdxk4IVuQ/6IR67VGCInBJ/1hzXOB2I2wqOtJMspW mPR1SPVKCd/rh3/eoHPEl8hWAN+SqXbJt4Ys+yFkxiUEZroytKCtaB5IzG0m3sA2Fy14Zr l683d150SW/08y043fZt5Yf4Zoup96o= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1707106939; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KA7h8vOvfSX6ACTF9OddwdPA14npoU1mUKyv2oBG32U=; b=tfNXtZ3c1AjUC60U2PGHiAZA5hiZnFFWTn2rBT0+AaYHaM55+JfpDdWUzsLZIpDO85D5mS XS+6vtUHlYl6SACg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 3F6F7132DD; Mon, 5 Feb 2024 04:22:19 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id ejZ3DXtiwGVoWwAAD6G6ig (envelope-from ); Mon, 05 Feb 2024 04:22:19 +0000 Message-ID: Date: Mon, 5 Feb 2024 05:22:09 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Remove remnants of partial DIEs from DWARF reader To: Tom Tromey , gdb-patches@sourceware.org References: <20240204191646.4008184-1-tom@tromey.com> Content-Language: en-US From: Tom de Vries In-Reply-To: <20240204191646.4008184-1-tom@tromey.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Authentication-Results: smtp-out1.suse.de; none X-Spamd-Result: default: False [-3.09 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Level: X-Spam-Score: -3.09 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2/4/24 20:16, Tom Tromey wrote: > When rewriting the DWARF scanner, I forgot to remove > dwarf2_cu::load_all_dies and dwarf2_cu::partial_dies. This patch > corrects the oversight and fixes up a couple other spots that mention > partial DIEs, which no longer exist. LGTM. Approved-By: Tom de Vries Thanks, - Tom > --- > gdb/dwarf2/cu.c | 3 +-- > gdb/dwarf2/cu.h | 14 ++------------ > gdb/dwarf2/read.c | 5 ++--- > 3 files changed, 5 insertions(+), 17 deletions(-) > > diff --git a/gdb/dwarf2/cu.c b/gdb/dwarf2/cu.c > index a1675b0d313..ae46dd2a9b2 100644 > --- a/gdb/dwarf2/cu.c > +++ b/gdb/dwarf2/cu.c > @@ -42,8 +42,7 @@ dwarf2_cu::dwarf2_cu (dwarf2_per_cu_data *per_cu, > producer_is_clang (false), > producer_is_gas_lt_2_38 (false), > producer_is_gas_2_39 (false), > - processing_has_namespace_info (false), > - load_all_dies (false) > + processing_has_namespace_info (false) > { > } > > diff --git a/gdb/dwarf2/cu.h b/gdb/dwarf2/cu.h > index d14397380de..ad89228ef8d 100644 > --- a/gdb/dwarf2/cu.h > +++ b/gdb/dwarf2/cu.h > @@ -136,12 +136,8 @@ struct dwarf2_cu > distinguish these in buildsym.c. */ > struct pending **list_in_scope = nullptr; > > - /* Hash table holding all the loaded partial DIEs > - with partial_die->offset.SECT_OFF as hash. */ > - htab_t partial_dies = nullptr; > - > - /* Storage for things with the same lifetime as this read-in compilation > - unit, including partial DIEs. */ > + /* Storage for things with the same lifetime as this read-in > + compilation unit. */ > auto_obstack comp_unit_obstack; > > /* Backlink to our per_cu entry. */ > @@ -274,12 +270,6 @@ struct dwarf2_cu > > bool processing_has_namespace_info : 1; > > - /* This flag will be set when reading partial DIEs if we need to load > - absolutely all DIEs for this compilation unit, instead of just the ones > - we think are interesting. It gets set if we look for a DIE in the > - hash table and don't find it. */ > - bool load_all_dies : 1; > - > /* Get the buildsym_compunit for this CU. */ > buildsym_compunit *get_builder (); > }; > diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c > index e873d9cc440..c92554c929d 100644 > --- a/gdb/dwarf2/read.c > +++ b/gdb/dwarf2/read.c > @@ -25,8 +25,7 @@ > along with this program. If not, see . */ > > /* FIXME: Various die-reading functions need to be more careful with > - reading off the end of the section. > - E.g., load_partial_dies, read_partial_die. */ > + reading off the end of the section. */ > > #include "defs.h" > #include "dwarf2/read.h" > @@ -21490,7 +21489,7 @@ dwarf2_find_containing_comp_unit (sect_offset sect_off, > if (this_cu->is_dwz != offset_in_dwz || this_cu->sect_off > sect_off) > { > if (low == 0 || this_cu->is_dwz != offset_in_dwz) > - error (_("Dwarf Error: could not find partial DIE containing " > + error (_("Dwarf Error: could not find CU containing " > "offset %s [in module %s]"), > sect_offset_str (sect_off), > bfd_get_filename (per_bfd->obfd));