From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id EE5963858D1E for ; Tue, 14 Feb 2023 19:35:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EE5963858D1E Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 31EJZ3jf011863 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Feb 2023 14:35:08 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 31EJZ3jf011863 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1676403308; bh=nP13ML4jhiOvr7A0OAViHaE27OsrUfSjSv7ttWld6U4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=qPZeHZ4ihuRVGv4o+SfPABTTesGPCqqV2qC9m3Ic7wni77zjRldQj4HC3iNKF+m6C 21dX4me/qE0+7P7HsXMQjY5T7JQ92g76AEh+7tiTeemMF/66kGCx+FncVRR93t04jB taKQlYmZ4maMmqM/MFnuFyrEA/o0rfATDweLvZMk= Received: from [172.16.0.192] (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) (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 6B94E1E110; Tue, 14 Feb 2023 14:35:03 -0500 (EST) Message-ID: <5757c2f7-07ae-1d14-5af2-e6b67cbf0c89@polymtl.ca> Date: Tue, 14 Feb 2023 14:35:03 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 Subject: Re: [PATCH 2/4] gdb/dwarf2: move some things to read.h Content-Language: fr To: Thiago Jung Bauermann , Tom Tromey Cc: gdb-patches@sourceware.org References: <20230213145559.46676-1-simon.marchi@polymtl.ca> <20230213145559.46676-3-simon.marchi@polymtl.ca> <873579dttn.fsf@tromey.com> <87sff90yss.fsf@linaro.org> From: Simon Marchi In-Reply-To: <87sff90yss.fsf@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Tue, 14 Feb 2023 19:35:03 +0000 X-Spam-Status: No, score=-3032.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 2/13/23 21:24, Thiago Jung Bauermann wrote: > > Tom Tromey writes: > >>>>>>> "Simon" == Simon Marchi via Gdb-patches writes: >> >> Simon> The following 2 patches move .gdb_index and .debug_names reading code to >> Simon> their own file. Prepare this by exposing some things used by that code >> Simon> to read.h. >> >> Simon> +/* If FILE_MATCHER is NULL or if PER_CU has >> Simon> + dwarf2_per_cu_quick_data::MARK set (see >> Simon> + dw_expand_symtabs_matching_file_matcher), expand the CU and call >> Simon> + EXPANSION_NOTIFY on it. */ >> Simon> + >> Simon> +bool >> Simon> +dw2_expand_symtabs_matching_one >> Simon> + (dwarf2_per_cu_data *per_cu, >> Simon> + dwarf2_per_objfile *per_objfile, >> Simon> + gdb::function_view file_matcher, >> Simon> + gdb::function_view expansion_notify); >> >> Don't we normally write "extern" in headers? > > IIUC “extern” is only meaningful for variable and template declarations. For some reason, our coding standards says we should use extern for function declarations: https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards#Function_Prototypes But I don't understand why, IMO it just consumes some columns for no purpose. Also, it's not always respected, there are many header files that don't use it. Simon