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 [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 8159D382FCA2 for ; Fri, 9 Dec 2022 19:24:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8159D382FCA2 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670613897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=v/jW7MajRlRyKA6NTnYky/mJPI10zAQwcSvTV434nbM=; b=BSjC/TBFPQd0E8iB3bRYxqHm2bNADPoSEQjwhHKO0e0v3v51PJUTxGWwKuwOxpwOGh60bM E9r/qzlG279ViwS2g7GgYkyF0bpMPdUUufKCdXExK6bCxJDf4ZVYRrAY77uZEGB9CSZhEk evQpDq5uuTzCZHlvFT4N3Ibw/ZBHe4k= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-653-nRfwv3TuMXickxS6kvBf6w-1; Fri, 09 Dec 2022 14:24:53 -0500 X-MC-Unique: nRfwv3TuMXickxS6kvBf6w-1 Received: by mail-wm1-f72.google.com with SMTP id h9-20020a1c2109000000b003cfd37aec58so307865wmh.1 for ; Fri, 09 Dec 2022 11:24:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=v/jW7MajRlRyKA6NTnYky/mJPI10zAQwcSvTV434nbM=; b=OZjbnOYdlzLsydeeaXMJwZdGhVAFJQOgc+JHuVPRm8FagB4tydyD5go4m4GwROQZ1W pWxGj+d5WcQMCOEzdhFd6d48A4Dt3IiD2I/rTkutuJaEnlPC8OtLHKUot0v1oV/ez2IG S+uknJO5PLBJv193Vie++/vmEvmIpUdSfunAnkbbGZKshbZ3CRrLo5L14TM3I2KyPa5m 0bOFkr3GUVEAM369NryuQIf1G/LoGneZFTsSgFOLPqChk0JN71OHfsQO/6e7cM3jM4km Vbyn5esgMd2NokI+gAYm5Ni20N0vJMCcJUUvUerFWDnL2pGCP96veRRE6dHBrjmF5wi8 lDIQ== X-Gm-Message-State: ANoB5plyscT2nHH+7eVhIPclZKDVY5xY47Pz9oVzutjf/LtF7vj31Cns X+zVRomXO8BC+YPTR3szvn+NdhPC4JtBLT69MtJBBi8tsBoxfkyy6u5w0nmuyuuAli+YnbQkGvy eLLvKhqxThKuHxYnFlQaVcw== X-Received: by 2002:adf:f902:0:b0:232:be5b:a22f with SMTP id b2-20020adff902000000b00232be5ba22fmr4240264wrr.59.1670613892593; Fri, 09 Dec 2022 11:24:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf5T2TOiReZSC8/fR4DaFKBi0ZJz/X0/+hDQXrIKT51CJ513HCn+t4jD4MVPjGF47Tc1ENLVHg== X-Received: by 2002:adf:f902:0:b0:232:be5b:a22f with SMTP id b2-20020adff902000000b00232be5ba22fmr4240258wrr.59.1670613892431; Fri, 09 Dec 2022 11:24:52 -0800 (PST) Received: from localhost ([31.111.84.238]) by smtp.gmail.com with ESMTPSA id f4-20020a5d58e4000000b00241d21d4652sm2091893wrd.21.2022.12.09.11.24.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 11:24:52 -0800 (PST) From: Andrew Burgess To: Tom Tromey , Andrew Burgess via Gdb-patches Cc: Tom Tromey Subject: Re: [PATCH 2/2] gdb/testsuite: new test for recent dwarf reader issue In-Reply-To: <87lengh250.fsf@tromey.com> References: <87lengh250.fsf@tromey.com> Date: Fri, 09 Dec 2022 19:24:51 +0000 Message-ID: <875yek2xdo.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,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: Tom Tromey writes: >>>>>> "Andrew" == Andrew Burgess via Gdb-patches writes: > > Thank you for doing this. > > Andrew> - However, GDB checks each partial symbol using multiple languages, > Andrew> not just the current language (C in this case), so, when GDB > Andrew> checks using the C++ language, the symbol name is first demangled, > Andrew> the code that does this can be found > Andrew> lookup_name_info::language_lookup_name. As the demangled form of > Andrew> 'signed int' is just 'int', GDB then looks for any symbols with > Andrew> the name 'int', most partial symtabs will contain such a symbol, > Andrew> so GDB ends up expanding pretty much every symtab. > > It's a pedantic point but what happens here is name canonicalization, > not demangling. Demangling is just used to refer to the translation > from a name like "_Zmumble" to "something::else" -- that is, the input > is a linkage name and the output is a C++ name. Canonicalization takes > a C++ name as input and returns the standard form, basically dealing > with the fact that C++ (and as we discovered, C) has multiple possible > spellings for some symbols. Please, be pedantic. My goal here was to better understand this code, there's no point me understanding it wrong. I'll reword that paragraph. Thanks for taking a look. Andrew