From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 8ohmN56Lk2NgoSMAWB0awg (envelope-from ) for ; Fri, 09 Dec 2022 14:25:18 -0500 Received: by simark.ca (Postfix, from userid 112) id D2FF81E124; Fri, 9 Dec 2022 14:25:18 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=T2nMm5Z+; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.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 75CDE1E0D3 for ; Fri, 9 Dec 2022 14:25:18 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BCB8D3886A1A for ; Fri, 9 Dec 2022 19:25:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BCB8D3886A1A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670613917; bh=v/jW7MajRlRyKA6NTnYky/mJPI10zAQwcSvTV434nbM=; h=To:Cc:Subject:In-Reply-To:References:Date:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=T2nMm5Z+LFDbsr751nqxpi6aLjclvrnqRhwf+5KlhTUp+/QtHerNwtzH/0cprvCs0 /6eLZSmYrh82GbtGN83eiME4kYZ6SDyrGwBdSHQ4U2TM5ZdWULuEbiBi1p+n7UaqM9 4G5B5uV8vl7eDYhSNFnl9wmX2Z94m3ZRbnRoyaB4= 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 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) 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-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: Andrew Burgess via Gdb-patches Reply-To: Andrew Burgess Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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