From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 82A7A3858C62 for ; Wed, 18 Jan 2023 22:06:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 82A7A3858C62 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [10.0.0.11] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 0024A1E112; Wed, 18 Jan 2023 17:06:57 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1674079618; bh=+c608wEOHH0mjQEADcTN7U4iwcge5RY5A58c4Jku4ak=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=T+GzWKMdm+QHsyhcV02fobWYqvO29Jf7PT4ugxiJeMMMsynVW4tkSCCEeP4rAemKK 5k5mBGL8uuVEa+oeMhvBV6Im6jYdYcwaSVD5vOujeX9j4UM2raIvyj+nR/PoCNT3Bd bQpnbXwrdsQOTFm2N7edKAg3bBW9h6mbXvXEBjR0= Message-ID: <2ae94116-fb85-ee8b-8772-4cf176a45c11@simark.ca> Date: Wed, 18 Jan 2023 17:06:57 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH 3/6] Pass section index to start_compunit_symtab Content-Language: en-US To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20230118153025.342512-1-tromey@adacore.com> <20230118153025.342512-4-tromey@adacore.com> <56ff147d-d09f-2093-efac-50b1eee555d0@simark.ca> <87pmbbzekb.fsf@tromey.com> From: Simon Marchi In-Reply-To: <87pmbbzekb.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP 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 1/18/23 17:02, Tom Tromey via Gdb-patches wrote: >>>>>> "Simon" == Simon Marchi writes: > >>> + SECTION_INDEX is the index of the section for the compunit and >>> + for block symbols in this compunit. Normally SECT_OFF_TEXT. */ > > Simon> I don't understand this comment, specifically how a compunit can "have" > Simon> a single section. Don't compunits define data and text symbols, which > Simon> have different sections, for instance? > > I can reword it, this only refers to the section for blocks. See > compunit_symtab::m_block_line_section. > > Simon> I'm curious to know why we have to store that and we can't always use > Simon> SECT_OFF_TEXT, but I guess that will come with the following patches. > > I suspect this is dead code, I just didn't change it in this series. > I could though if you'd prefer. I suppose that if it's indeed always the text section that is passed, it would be easy to spot. Simon