From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id YUDNKPCcOWqB3BMAWB0awg (envelope-from ) for ; Mon, 22 Jun 2026 16:37:04 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=IMbUCM7Y; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id A35131E070; Mon, 22 Jun 2026 16:37:04 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (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 17E6F1E070 for ; Mon, 22 Jun 2026 16:37:04 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 94D8B4B9DB78 for ; Mon, 22 Jun 2026 20:37:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 94D8B4B9DB78 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=IMbUCM7Y Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id C067E4B9DB73 for ; Mon, 22 Jun 2026 20:35:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C067E4B9DB73 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C067E4B9DB73 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1782160535; cv=none; b=qcmjWBU0MJTZWZC1YcDnB2iq2MtffO/RSNZvDogWbWhhhPzWGqG15s3jwlJoCgYTGtuWLdhY0bIZ2NuGHDw0c1WyUECC7xVUu0axckqPK6GwzLdrRfyRtUtU2H278LwJ7K2N5HsPEhe/oCQxqrBgkFk934YiMK48iWCiy5iKpCo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1782160535; c=relaxed/simple; bh=MPWaRXWvjDVCLS/5Be8SG2U3G/d4P48kv01Dl62gtes=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=HHFlrAipr4aJREoE5Gcy8a/yvwmj65BbRWt+BKZ5Dacd3/og1lwQmMnLWrEFm+kU17WXCXNqTlslwyZkVZAh3n+So+TLhi+bBKze2Bqatrshma09Tl/zKQkVX+hU3+yfJgLO+XKHA4XgQCtl5VMxONVnH5VvJn4YjKtt46qfJ1s= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=IMbUCM7Y DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C067E4B9DB73 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1782160535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Kr6LUcHvimJfvemp/swZwlYo9Xvznze5WzIAB3TB6Qc=; b=IMbUCM7YA5fzLrl3JRtwhiiUUBi/Q3mwsRbYC1DoIVOuexGB7T3aVRb91Dedf9CtlDG06V 1gPEGtuRXWatJWH+iBUlT4Ozf5uWdCqVKbDoAIXvqNiqtFoIH4wuZ+74cVjSX9hYurh2gm vZB477niLPpgcCih7y8nfM6fReM9uXc= Received: from mail-vs1-f70.google.com (mail-vs1-f70.google.com [209.85.217.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-209-5SfirJ_OMMWdKuCvTR3oMA-1; Mon, 22 Jun 2026 16:35:34 -0400 X-MC-Unique: 5SfirJ_OMMWdKuCvTR3oMA-1 X-Mimecast-MFC-AGG-ID: 5SfirJ_OMMWdKuCvTR3oMA_1782160533 Received: by mail-vs1-f70.google.com with SMTP id ada2fe7eead31-6c554284973so6166065137.2 for ; Mon, 22 Jun 2026 13:35:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782160533; x=1782765333; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Kr6LUcHvimJfvemp/swZwlYo9Xvznze5WzIAB3TB6Qc=; b=HFA5FOe+1szK66MbrGOqkVnFvalb4MS9sTx+1k9HbOZAolsQLPYCS3QrzKuobUD8QE aMN5/mEGvvgsC9XOqSQYKX7PSorOvtU7ynA/YSP3wiXoYV6zOcM1QvpECRea5VglyiWz EcI867xVRT1QlsaCEp4SJBqxZDZSlwqGjGeclWyYxrre9DietXo8zHA2zR3sKKSsf2S+ 4O8SyEKUwhSGo3eTDclCOqlrkgqL3ZddOVvHRVgpmHwzyBTDfKORJc317UsSF4flwnCk gCl2KJX4T83laSjEvdeI5mX6N9AXl2QvsfVfJnVPsTmeUZBwlycjVhDBgB4nfC7UDCNU vntw== X-Gm-Message-State: AOJu0Yy6XipaL25UtwXKyeBCaiLiQBDvV9CjNYphZoqvnLQciXUjKUid jlQY9BF8WySaYLXx2SP8FDvsTw2I807BVS9+A3s8U1L/hBg9kBg2jyNH7pkPBbEmm6nZeAdpzBI bvFXPdrpFaEfy4LiQh/4xgzl12AOvAOwteCejTg5mnQ4xZXfaCHKCJM3jjWcU3HxlsK1KJtdXUP +xIZGuVVvKCvA5ew1okBiT6nQ2GnUdfeGMCPl7Qbp8xpRlhtVU X-Gm-Gg: AfdE7clwcqWP+dCA+KcZjLoR1p2TImGjpmGVGEGftwYnxz/28Gtvq/DCkA2CJKmly/B aqLgr4MuHlCkhEmpWt2A02/6HK6TPvsZdPzjWJiIgo5JO7zVjy6LmjSOzKAyjJiKw/aqcYEjKdA cjEBq5X8D0VhQf84ewKq/6PKrFk5pmk8x8aEIWViMAtzXwq/2tNZfxY/Jl7u7XVlRDgsnTCt4Cg HhWsM+itv6qU+0tiB7LAzT0gmGINR+rzQgUTYuGtHq6f3vZUvIaSZ5DeFcNiolus8dD5B7zbutD UU2/V/AZ/RJWTtFtqKRuZYgaZ2D1/C9NVEgF/QaRNr1QMXzlrzeXXW/UFm/5ZA4kBO4xL9mp9CL PQHfARcwOyTiDC0ibFDTH X-Received: by 2002:a05:6102:dcd:b0:6e9:47be:3ff7 with SMTP id ada2fe7eead31-72a1f0ab6e6mr9888227137.13.1782160533483; Mon, 22 Jun 2026 13:35:33 -0700 (PDT) X-Received: by 2002:a05:6102:dcd:b0:6e9:47be:3ff7 with SMTP id ada2fe7eead31-72a1f0ab6e6mr9888200137.13.1782160532949; Mon, 22 Jun 2026 13:35:32 -0700 (PDT) Received: from ?IPV6:2804:14d:8084:993e::75d? ([2804:14d:8084:993e::75d]) by smtp.gmail.com with ESMTPSA id a1e0cc1a2514c-9671a7ea5a8sm5225817241.11.2026.06.22.13.35.31 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jun 2026 13:35:32 -0700 (PDT) Message-ID: <330153cc-97cb-42da-acb1-551b50ea54b6@redhat.com> Date: Mon, 22 Jun 2026 17:35:29 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PING][PATCH v7 0/5] Introduce syntax for linker-namespace specific symbols To: gdb-patches@sourceware.org References: <20260601192251.60958-1-guinevere@redhat.com> From: Guinevere Larsen In-Reply-To: <20260601192251.60958-1-guinevere@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: lPtdFaE2xtTJV-8aAkTkyHBTnKg3FhV5aimAdP9yTKY_1782160533 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 Ping! :) On 6/1/26 4:22 PM, Guinevere Larsen wrote: > This series adds support for the syntax [[N]]::foo to find symbols that > belong to specific namespaces, while also making GDB's behavior more > consistent when a namespace is not specified. This needs 2 preparatory > patches and 2 patches actually implementing this feature, and one final > patch to make symtab searching more consistent with the [[N]]::foo > syntax. > > Patch 1 is a small refactor, creating a function to figure out the > current linker namespace. Patch 2 is an essential fix, updating how we > calculate a variable's copy relocation to take linker namespaces into > account. > > Patches 3 and 4 implement the new syntax, adding the necessary > supporting code and updating error messages when symbols can't be found > - where it made sense. Patch 5 is a small change to the find_symtab > function, to prefer symtabs from the current linker namespace. > > Changes for v7: > * Added 2 new patches to the series, one to solve Andrew's feedback and > another to fix an inconsistency I found. > * Minor cosmetic fixes > * rebased on master > > Changes for v6: > * Rebased on master > * Fixed a crash when using the [[N]]::foo syntax before starting the > inferior > > Changes for v5: > * fixed crash when getting the value of a variable before the inferior > starts. > * Rebased on master > > Changes for v4: > * Fixed final documentation feedback from Eli. > * Changed error message when [[N]]::foo::bar fails to find 'foo'. > * Fixed build breakage. > > Changes for v3: > * Removed previous patches 1 and 2, as Simon's recently merged patches > already did those in a better way. > * parser_state now also takes the current solib_ops, since that can't be > obtained from gdbarch anymore. > > Changes for v2: > * solib_supports_linker_namespaces now always expects a pointer. > * Previous patches 2 and 3 were dropped. > * lookup_minimal_symbol_linkage now takes an array_view. > * created new tokens for [[ and ]], to ensure that [[N]] looks like > that. > * Fixed formatting nits from Eli. > > > Guinevere Larsen (5): > gdb: Create helper function for the current namespace > gdb: make lookup_minimal_symbol_linkage work with linker namespaces > gdb: Make the parser recognize the [[N]] syntax for variables > gdb: extend the [[N]]::foo syntax for files > gdb: prefer symtabs for the current linker namespace > > gdb/NEWS | 5 + > gdb/c-exp.y | 93 ++++++++++--- > gdb/doc/gdb.texinfo | 6 + > gdb/dwarf2/ada-imported.c | 8 +- > gdb/linespec.c | 4 +- > gdb/minsyms.c | 137 ++++++++++++------- > gdb/minsyms.h | 21 ++- > gdb/parse.c | 3 +- > gdb/parser-defs.h | 50 ++++++- > gdb/rust-parse.c | 3 +- > gdb/solib-svr4.c | 20 --- > gdb/solib.c | 108 +++++++++++++-- > gdb/solib.h | 29 ++++ > gdb/symtab.c | 94 +++++++++++-- > gdb/symtab.h | 12 +- > gdb/testsuite/gdb.base/dlmopen-ns-ids-lib.c | 14 ++ > gdb/testsuite/gdb.base/dlmopen-ns-ids-main.c | 8 ++ > gdb/testsuite/gdb.base/dlmopen-ns-ids.exp | 83 +++++++++++ > 18 files changed, 570 insertions(+), 128 deletions(-) > > > base-commit: 909db30adab1688870e978c85d014d4a36641f4e -- Cheers, Guinevere Larsen it/its she/her (deprecated)