From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.efficios.com (mail.efficios.com [167.114.26.124]) by sourceware.org (Postfix) with ESMTPS id 04FF83858406 for ; Fri, 19 Nov 2021 23:00:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 04FF83858406 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 7199C3AB720; Fri, 19 Nov 2021 18:00:13 -0500 (EST) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id dmMr6FmLL6qd; Fri, 19 Nov 2021 18:00:12 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 4F0AB3AB71E; Fri, 19 Nov 2021 18:00:12 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 4F0AB3AB71E X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id DN7-cvUXLojq; Fri, 19 Nov 2021 18:00:12 -0500 (EST) Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) by mail.efficios.com (Postfix) with ESMTPSA id 35C193AB54E; Fri, 19 Nov 2021 18:00:12 -0500 (EST) Message-ID: Date: Fri, 19 Nov 2021 18:00:11 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [PATCH] gdb: use actual DWARF version in compunit's debugformat field Content-Language: en-US To: Tom Tromey , Simon Marchi via Gdb-patches References: <20211119020845.2606300-1-simon.marchi@efficios.com> <875ysnaneo.fsf@tromey.com> From: Simon Marchi In-Reply-To: <875ysnaneo.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Fri, 19 Nov 2021 23:00:15 -0000 On 2021-11-19 15:41, Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi via Gdb-patches writes: > > Simon> - get_builder ()->record_debugformat ("DWARF 2"); > Simon> + get_builder ()->record_debugformat > Simon> + (gdb_obstack_printf > Simon> + (&this->per_objfile->objfile->objfile_obstack, > Simon> + "DWARF %u", this->header.version)); > Simon> get_builder ()->record_producer (producer); > > If you use objfile::intern, you'll end up with just a single copy of > this string on the obstack, instead of one per CU. Ohhh, that seems nice, I'll try that. Simon