From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id HcIkAFpWRmJtKwAAWB0awg (envelope-from ) for ; Thu, 31 Mar 2022 21:33:14 -0400 Received: by simark.ca (Postfix, from userid 112) id EC8151F163; Thu, 31 Mar 2022 21:33:13 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,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 6DF411ED17 for ; Thu, 31 Mar 2022 21:33:13 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D80513888C63 for ; Fri, 1 Apr 2022 01:33:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D80513888C63 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1648776792; bh=nD9X9O5DiMOgOHXQz41P9SxQTTQeQs2MFQ51q/Y5iUM=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=i+NiGBZ52vXzSOz/mkLfco8NhUjGb0l5Nz491SmECDEdB0qqprzTXOjcJPPcjvi+k Eu8bYGqknxyYfvqus/FtJ51rVhIKkJSu+7CSHjocqqpSI5CXKLBFeuPjHAzTgEC/ns Qnh9le0KVMpdKOwIafpDU29FgScwpdIoI68Iip40= Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 65D1A3858C52 for ; Fri, 1 Apr 2022 01:32:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 65D1A3858C52 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 2311WiVS009993 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 31 Mar 2022 21:32:49 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 2311WiVS009993 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (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 83BD21ED17; Thu, 31 Mar 2022 21:32:44 -0400 (EDT) Message-ID: Date: Thu, 31 Mar 2022 21:32:44 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH 1/3] gdb/ctf: don't create a buildsym_compunit when building partial symbols Content-Language: en-US To: Wei-min Pan , gdb-patches@sourceware.org References: <20220331212019.2811099-1-simon.marchi@polymtl.ca> <90ec7aeb-6e9d-bd6c-236e-d74c2c6bf2a6@oracle.com> <6c5620d6-c076-33b0-d8d1-11701a53afd8@polymtl.ca> <68ff0d4f-2b63-fcad-6798-d6dbc458a914@oracle.com> In-Reply-To: <68ff0d4f-2b63-fcad-6798-d6dbc458a914@oracle.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Fri, 1 Apr 2022 01:32:44 +0000 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: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" > Here is the spec for CTF V3: > > http://www.esperi.org.uk/~oranix/ctf/ctf-spec.pdf > > which hopefully is helpful. Thanks, I read the first section (CTF archives), I think it somewhat matches what I thought. I'm not sure about how the details of how types are deduplicated exactly, but that's not relevant for this patch. >> I'll attach the output of "readelf --ctf=.ctf" for the file I am working >> with. >> >> My understanding from the readelf output is that there is some debug >> info (function, types, etc) described at the top-level. It doesn't seem >> associated to a source file, and it seems to contain things that are >> global. >> >> Then there is one "archive" for each compiled .c file, such as: >> >> CTF archive member: /home/simark/src/babeltrace/src/lib/current-thread.c: >> >> Each archive contains very little data, my guess is that it only >> contains what is not already described at the top-level? > > Yes, that's my understanding too. > >> >> Right now, in GDB, we create one CU (partial_symtab, and then >> compunit_symtab after expansion) for the top-level, and the one CU for >> each archive. My patch does not change that. It only removes a >> "new buildsym_compunit" call that just seems useless / to do nothing. >> >> In other words, no user-visible changes are expected from this patch. > > OK. Thanks. Thanks, I will push the series, let me know if you see something breaking. Simon