From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 7E9CE3839C45 for ; Mon, 28 Jun 2021 19:45:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7E9CE3839C45 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-19-Ku4zvDEGPdi_P1fi9UOt_Q-1; Mon, 28 Jun 2021 15:45:18 -0400 X-MC-Unique: Ku4zvDEGPdi_P1fi9UOt_Q-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 92E3B804309; Mon, 28 Jun 2021 19:45:17 +0000 (UTC) Received: from [10.3.113.184] (ovpn-113-184.phx2.redhat.com [10.3.113.184]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4594F19C79; Mon, 28 Jun 2021 19:45:16 +0000 (UTC) Subject: Re: [PATCH] gdb, dwarf: Don't follow the parent of a subprogram to get a prefix. To: "Willgerodt, Felix" , "gdb-patches@sourceware.org" References: <20210624115014.2813120-1-felix.willgerodt@intel.com> <77ca804e-2610-befd-c02b-717e11ec6ef8@polymtl.ca> <523f330798dd4e5da64d4e2e9528651d@intel.com> <97b10d2c-3bdb-46d1-9ce7-2309f8ab7d9d@polymtl.ca> From: Keith Seitz Message-ID: <0635ee56-d289-1f60-9608-859e05fee5b8@redhat.com> Date: Mon, 28 Jun 2021 12:45:15 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <97b10d2c-3bdb-46d1-9ce7-2309f8ab7d9d@polymtl.ca> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Mon, 28 Jun 2021 19:45:21 -0000 On 6/28/21 12:21 PM, Simon Marchi via Gdb-patches wrote: > I do think that showing "class F1::F2" is wrong for sure. It would be > the right thing to show for for: > > struct F1 { > struct F2 { > } > } > > I'd just like to have a third opinion on the matter. If others think > that showing the short name is fine, then that's fine with me too. This situation isn't altogether dissimilar from how we handle static variables defined inside functions, e.g., 1 static int 2 foo() 3 { 4 static const int value = 21; 5 return value; 6 } 7 8 int 9 main() 10 { (gdb) p foo()::value $2 = 21 FWIW, Keith