From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id +e6HD01So18FYwAAWB0awg (envelope-from ) for ; Wed, 04 Nov 2020 20:15:57 -0500 Received: by simark.ca (Postfix, from userid 112) id 3365B1F08D; Wed, 4 Nov 2020 20:15:57 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 836D31E99A for ; Wed, 4 Nov 2020 20:15:56 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0EC00398B145; Thu, 5 Nov 2020 01:15:56 +0000 (GMT) Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 102583896C39 for ; Thu, 5 Nov 2020 01:15:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 102583896C39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark@simark.ca Received: from [10.0.0.11] (173-246-6-90.qc.cable.ebox.net [173.246.6.90]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 918E61E58E; Wed, 4 Nov 2020 20:15:53 -0500 (EST) Subject: Re: [PP?] [PATCH] Remove objfile parameter from abbrev_table::read To: Tom Tromey , gdb-patches@sourceware.org References: <20201104231056.30808-1-tom@tromey.com> From: Simon Marchi Message-ID: Date: Wed, 4 Nov 2020 20:15:53 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20201104231056.30808-1-tom@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 7bit 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: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 2020-11-04 6:10 p.m., Tom Tromey wrote: > In a longer series that I am working on, I needed to remove the > objfile parameter from abbrev_table::read. It seemed to me that this > was a simple and relatively harmless patch, so I'm sending it now. > > gdb/ChangeLog > 2020-11-04 Tom Tromey > > * dwarf2/read.c (read_cutu_die_from_dwo) > (cutu_reader::cutu_reader, cutu_reader::cutu_reader) > (build_type_psymtabs_1): Update. > * dwarf2/abbrev.h (struct abbrev_table): Remove objfile > parameter. > * dwarf2/abbrev.c (abbrev_table::read): Remove objfile parameter. > Don't read section. LGTM, though I'd add a note in the abbrev_table::read comment, that the caller is responsible to make sure the section is read in. As well as an assert in abbrev_table::read that checks it. Simon