From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id WCM2LE6KbGKTZAMAWB0awg (envelope-from ) for ; Fri, 29 Apr 2022 21:01:02 -0400 Received: by simark.ca (Postfix, from userid 112) id A4BA11E058; Fri, 29 Apr 2022 21:01:02 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, NICE_REPLY_A,RDNS_DYNAMIC 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 356BD1E01D for ; Fri, 29 Apr 2022 21:01:02 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AA6F8385781D for ; Sat, 30 Apr 2022 01:01:01 +0000 (GMT) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by sourceware.org (Postfix) with ESMTPS id B003C3858405 for ; Sat, 30 Apr 2022 01:00:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B003C3858405 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f53.google.com with SMTP id k2so12736060wrd.5 for ; Fri, 29 Apr 2022 18:00:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:from:to:cc:references:in-reply-to :content-transfer-encoding; bh=YC1bBRWxGqeN4FPgViyllqeClrO8ttXal+KeSJlWKWo=; b=lUYteGFS+9BSyGz3+WbKMB4oTb2UbEc/VA7Uxi4gboDUMR+Vl2fOZ8eIwmNmz8Ql92 2nOIekeRI6K5fjWPdq7mwboN0gBecvKag9UUAu6E9YmN71TaW5w0UrfqLk9cUD8C+duz 2L5eZcNS6hb7OkdTQ3ISNIf2qWcAiAXGPDvD6AytTGVeGswRgaMgTcEdhTAO46RI7bqY O6OGoSzG+bqdwd/JgUiTw3sDt2kt8IJvxV486l/uOZLwp8Hmpm0Ah0Pic7Aqg1Zjb3zH 36Wy2dl0rIvIOmUx1CnhRmL9i7EbjGNzuI5za8vHSygEPJKvR+GLgfcVkblYCN/zBqBH tFTQ== X-Gm-Message-State: AOAM530MgHIPWn4I+EWSGMPIpZNIAhOKMByN2Fyg3gGMi99XRKP77X5t GVvkdMzaZ/53IokVNcveQdM= X-Google-Smtp-Source: ABdhPJwoNrt9uewXYiaKjDSVEcOK832oqdzRXI9ks+NDR6oif43f7uVTO0BQuouTkA1IIuHCf+ynbw== X-Received: by 2002:a5d:64a3:0:b0:20a:ef5c:adfe with SMTP id m3-20020a5d64a3000000b0020aef5cadfemr1245899wrp.146.1651280448529; Fri, 29 Apr 2022 18:00:48 -0700 (PDT) Received: from ?IPV6:2001:8a0:f924:2600:209d:85e2:409e:8726? ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id h26-20020a7bc93a000000b003942a244f4fsm556521wml.40.2022.04.29.18.00.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 29 Apr 2022 18:00:47 -0700 (PDT) Message-ID: <5a976d0c-ebeb-300e-bd63-437bcddebe93@palves.net> Date: Sat, 30 Apr 2022 02:00:45 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH] Fix gdb.cp/no-dmgl-verbose.exp test Content-Language: en-US From: Pedro Alves To: Keith Seitz , Carl Love , Lancelot SIX References: <5ee342cd5f5272da9970da8a077c2c5209b85d6c.camel@us.ibm.com> <20220429091234.62xhprge74gfpgks@ubuntu.lan> <4610920e52ea1bbeb5181c970887eb7cfe344f1a.camel@us.ibm.com> <032437ea-2ef4-90f5-7b96-8a729bae2252@redhat.com> <31261461-8f2a-8919-c882-3601a9adefd9@palves.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: , Cc: Ulrich Weigand , gdb-patches@sourceware.org, Rogerio Alves Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2022-04-29 19:40, Pedro Alves wrote: > Thanks for pointing at "ignore_typedefs" in cp-support.c, Keith. So if I hack out > that special casing for std::string, like in the patch below, then GDB replaces the > typedef, and setting the breakpoint works. However, that only works if we debug > a fully linked binary for some reason... If we debug just the .o file, then the symbol > still isn't found... That seems yet another bug somewhere. The fully-linked vs .o file difference was because with just the .o file, there's no main function, so GDB's language is set to "auto (currently c)". While with a fully-linked binary, the language is "auto (currently c++)". When the language is C, the typedef is expanded to "class $realtype". That "class " prefix is not part of the demangled name of the f function, so the breakpoint setting fails.