From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id VWzPH8NTxmX3cRgAWB0awg (envelope-from ) for ; Fri, 09 Feb 2024 11:33:07 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=jetbrains.com header.i=@jetbrains.com header.a=rsa-sha256 header.s=googleapps header.b=UKmDOqFJ; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 74BC51E0C3; Fri, 9 Feb 2024 11:33:07 -0500 (EST) Received: from server2.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 ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 314071E098 for ; Fri, 9 Feb 2024 11:33:05 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9E6DE385828F for ; Fri, 9 Feb 2024 16:33:04 +0000 (GMT) Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by sourceware.org (Postfix) with ESMTPS id 2AD033858C35 for ; Fri, 9 Feb 2024 16:32:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2AD033858C35 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=jetbrains.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=jetbrains.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2AD033858C35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::22c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707496366; cv=none; b=Mrl/jL5zw7SBq8/15uVSs1VfjzdkE1jpmMOlvpAyg69LvagxWmT0hd2OdILKfka7GrO8bpNB8PjwCl8mNKfweBHnB0NCwIbtXrVIl9g1ZhNUCwSJD93y+E1rrY23ZkFsPq6vduv3SZBRwhdrwxfhL2CKraF5niWuTOcL142qAR4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707496366; c=relaxed/simple; bh=tNys8jSHbNSmad2AhlPqZgg8yX4nxJ6SsHwAgfTlN5c=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=AY/Mohsy4Rn6hQiHYNQl/IQBZjrBa4/Nq2xgnDAMcSdJMNCv0jTLKrnNhLskR66h61TWnYC+ZyH0N4hz+VEoIcnVv00BUhFrJJfSv870n//u6+fGt+mF52oVvE2LswH+BrfTHu7bMMiNJ80rdxCQkzilb8eS1MvmYyHF7FwsxXc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oi1-x22c.google.com with SMTP id 5614622812f47-3bff5e9ccdeso371909b6e.3 for ; Fri, 09 Feb 2024 08:32:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jetbrains.com; s=googleapps; t=1707496363; x=1708101163; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=IuBt4IxfYDoFdlRUwqfxX7GcsJ+Rh+6/Xct8htk+wVQ=; b=UKmDOqFJR0VD4OWoyjBJdYDC9fcquwWXV1fT6lbEfiBJvUARPiyO3C75ZONei5OLMC riyK2jB4TOyWHhDVXeBiv9Gt8K9K2Te1H7N8hkyKiJuOvkSqLYFnBawX8sr3ot0VMqYy wnJYiqizeXgpjWeAEehC0669IPMwJAvhPVLPA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707496363; x=1708101163; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IuBt4IxfYDoFdlRUwqfxX7GcsJ+Rh+6/Xct8htk+wVQ=; b=LcsuHlR6bTWi/k1VlEpWt7TcH1hX33RaNZk2G41TVRyFE/BwPJIFVciCi3YC5SjbM+ Abhcl1OoGiD+6fjXgWReKAP58J3Qknf4+N3WoJm1L8BSjGGkg6XS/Z2FNZY9CDB7/QKs cK+Q/Pj9M9qU2o1yN3axJSg4Q1i/O691c80M/H6uwQGvMyMSp8zdKwCa/JexFl0H04DN bOlCD38GfhjrdZ2O1IEyOrjgORpYgIHx4CJMi1gsMXcNLYIsPSrJGfCmkN4W3y5sN6qh muc8a4oMN9//p9F2JqR1fNJ04HIuAbx/8fC5csW13RVFlstPp/BMHulIiFhkMVxeNB8N aktg== X-Gm-Message-State: AOJu0YyPqI+uU/aASe6lSzirOFvBC78CUr+bwk7Wzs05bSCAMvIcy9zt XEApa2lE0mtQMlIoVC4oerGexAtkcE/ommBu6q+BGJ+SHcFQnWzjcARXAXQHkc3tX8SBm47bogH //dJHF5ZffEsEHLg5BS5p6gTOk7f5hjmwrFQ/DHzo6A09I2h4Xw== X-Google-Smtp-Source: AGHT+IFqv9vyKr43WS1y1ubU6NcYJcJi4+kR+b4CiY7+/q8Q1a9V5YwBywpGyIBTSIGyGtx19vfKiQvSWUYN4MoQETo= X-Received: by 2002:a05:6808:148c:b0:3bf:da5c:37e4 with SMTP id e12-20020a056808148c00b003bfda5c37e4mr2687651oiw.8.1707496363430; Fri, 09 Feb 2024 08:32:43 -0800 (PST) MIME-Version: 1.0 References: <20240123170325.752251-1-dmitry.neverov@jetbrains.com> <20240125084404.3536456-1-dmitry.neverov@jetbrains.com> <87y1bw9g3b.fsf@tromey.com> In-Reply-To: <87y1bw9g3b.fsf@tromey.com> From: Dmitry Neverov Date: Fri, 9 Feb 2024 17:32:33 +0100 Message-ID: Subject: Re: [RFC v2][PR symtab/30520] gdb/symtab: fix the gdb.cp/anon-struct test To: Tom Tromey Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Tom> Dmitry> The symbol_name_match_type::SEARCH_NAME cannot be used because Tom> Dmitry> demangle_for_lookup_info doesn't initialize a demangled name Tom> Dmitry> for it which makes a subsequent name matching to fail. Tom> Tom> I don't think I understand this comment, but anyway shouldn't this pat= ch Tom> simply be folded into an earlier one in the series? Sorry, this is the first time I submit a series. I've noticed a test failure after I sent patches and wasn't sure how to update them. What should I do in such a situation? Create [RFC v3]? What I was trying to say in the commit message is that demangle_for_lookup_info::demangle_for_lookup_info has the following logic: if (without_params !=3D NULL) { if (lookup_name.match_type () !=3D symbol_name_match_type::SEARCH_NAME) m_demangled_name =3D demangle_for_lookup (without_params.get (), lang, storage); return; } So when symbol_name_match_type::SEARCH_NAME was used, the demangled name wasn't initialized which made subsequent name_matcher calls to not match. Switching to symbol_name_match_type::FULL fixes this. Tom> I read through these and they seem basically reasonable to me -- in li= ne Tom> with what I was hoping for. There are some minor formatting issues. Sorry, again. I've tried to follow the code style as closely as I can, but have missed something. I will try to be more careful next time. If there is some formatter I can run - please let me know. Tom> You didn't mention what testing you did, so I am curious about that. I've done only manual testing in the project where I can reproduce the problem with slow symbol lookup. I'm not sure how to write an automatic test checking that CU is not expanded unnecessarily. Are there any existing tests checking that? On Wed, Feb 7, 2024 at 9:25=E2=80=AFPM Tom Tromey wrote: > > >>>>> "Dmitry" =3D=3D Dmitry Neverov write= s: > > Dmitry> The symbol_name_match_type::SEARCH_NAME cannot be used because > Dmitry> demangle_for_lookup_info doesn't initialize a demangled name > Dmitry> for it which makes a subsequent name matching to fail. > > I don't think I understand this comment, but anyway shouldn't this patch > simply be folded into an earlier one in the series? > > I read through these and they seem basically reasonable to me -- in line > with what I was hoping for. There are some minor formatting issues. > > You didn't mention what testing you did, so I am curious about that. > > thanks, > Tom