From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id gcGkI7XWdGrU+g0AWB0awg (envelope-from ) for ; Thu, 06 Aug 2026 14:47:17 -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=ZRIbV/44; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 8B52A1E166; Thu, 06 Aug 2026 14:47:17 -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 [IPv6:2620:52:6:3111::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 EBFF81E09B for ; Thu, 06 Aug 2026 14:47:16 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CC81E4B99F45 for ; Thu, 6 Aug 2026 18:47:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CC81E4B99F45 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=ZRIbV/44 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 44DBB4BA9020 for ; Thu, 6 Aug 2026 18:46:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 44DBB4BA9020 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 44DBB4BA9020 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786042011; cv=none; b=GN0Jp4IprZRTG7IMun/jesSn6p9SeZsvyjoFExuWqcSxvLtooW/q0sK0gpoTIkcV2tNESOAej6Da42d8yWSmNPD1uhQOqv3zMmG+4e5s1iHItGftBcZ5dhqkJGzUkeTnjOgUUgNgl2SiQLU3uwPsnX3T+kLSAtB1F6eIyGmIuuY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786042011; c=relaxed/simple; bh=CmI9Ozhtj2NoVs9wqbwO6rFKT6TJqXave9jR3r0RhMI=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=qsMZWi61cNjaWr3XZxV2pZoktOiTZCNv00cTTwVl7/P14Lr2Fwk1Au51/RcdfnOzybckPr/2I4tXlGsfPqs/LOSn47183SlMUnhSabtXYr2LcUz+eqQfG4OYcaKnu9zHnK5J+T6N8ht2QAEKhLFLCFLL5OL4IKIQbJz8qUoTE7E= 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=ZRIbV/44 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 44DBB4BA9020 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1786042011; 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=Zb5U7ApgHSWXXikciCg73bmkHA3iu+AgHhgSHZ+a7gE=; b=ZRIbV/44Zipb1hrKBKenoGBzG9nJjHRtwzW6SOs/oY4qhJk16s6Aa8Gd0y2Dv8DV8Ub6B/ PI+4QGTItSSjTA+DT2B+ls81Km68REBLN2hPQ+Gvgk7tmzPFRKOyH9uIArQPSIeBeVmAxr bjnG1kj49EyDQXglZUBkQ/i8ek0wTIg= Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-358-AVTgDGikOQGFXDAt6EpooA-1; Thu, 06 Aug 2026 14:46:49 -0400 X-MC-Unique: AVTgDGikOQGFXDAt6EpooA-1 X-Mimecast-MFC-AGG-ID: AVTgDGikOQGFXDAt6EpooA_1786042009 Received: by mail-pg1-f199.google.com with SMTP id 41be03b00d2f7-c96b4f58ddcso2072112a12.3 for ; Thu, 06 Aug 2026 11:46:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786042009; x=1786646809; h=content-transfer-encoding:content-type: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:content-type; bh=Zb5U7ApgHSWXXikciCg73bmkHA3iu+AgHhgSHZ+a7gE=; b=TUQgH+YjqiEiLEnEU074Hjr4MA8C4bXFQpsAu7AhPZdaQ2aOB5bSGPTr6U7GnZJ3sr gPix3R2Ar+3amfKqXJZocpbsckhAURWy0ly6I5H4ifCDWJyKupApoA3Hb9rdH0KeAWkV +Hc4t2z42tU5gN2Tu3FxlhFBL+9Qfd5WTHvE4u82l5gbQpoL9Ovi2lV1NbeyGaTOKi0S Usi8bHtlUNNlqATJkbL4M6kowpGaS10hbSlJpHHxUVAsTtoTtUA7UsjwEQ0oUmPlI4tk 22R/aoGGLMhQqjhQ8rBNqU40tJ5ixToqDfPPy+tuq9MiDVKtU0YUHIsGJT+qJdMUI6p2 YRmg== X-Gm-Message-State: AOJu0Yztkfz5JS6bS8AMEVPJGdc76MLbi2dgPpRQDtlrsvTrgqBtD3U4 avB8FTcGf4uBt7+0wnvkIBBjB530/MO8zsEY+yKs850UyNphtz4NsOK670Os7YxNwA0ALLewf86 e+Juq17ytu68mrMjabuSMW+pPZIIS5i7VW7dKc6dDX1K/DCwusnbVEpoDBxNEOqECym6oAeMJQA znyj/+TVjPWbjUXWWaBaHfmKzL0qgCFT5ROLSB9hAyIhXX1wey X-Gm-Gg: AR+sD10PvbyhnxxbM4DSvqYXBxY5TDWwzHi9DE0kohK37SGNOgNA15n3phPnxm++pJB dOfOppdXhqYNZn8358//ehkOYK6r7IbWzLwAIRwTVNJQSuIxAIHcJ2E7F3N+GO+C9aVvkBV465d 3/aPd4qhTqhmlTORjyxb0B5mquUR25JNnOWuselcV8FSXjiua33JkjfXm7MJ8RIknjM+eYWI0XK ozAMxe5LzkchkxNT641XpAa2ScrXwsgLKMHSrgfkYpzPcPH0QwoN382fZqx4UVMRMDfowcJWS7i ywtbCSoCFeyjoAUlfeOczHcW8e6MrmamKRI1s3lt9A7L74YtxD4Wdrl0QKRQvFp/fuo1g+N9l17 Ykaj/AUuXgQ== X-Received: by 2002:a05:6a21:9201:b0:3bf:7bf7:7913 with SMTP id adf61e73a8af0-3cb85dee577mr19917502637.14.1786042008665; Thu, 06 Aug 2026 11:46:48 -0700 (PDT) X-Received: by 2002:a05:6a21:9201:b0:3bf:7bf7:7913 with SMTP id adf61e73a8af0-3cb85dee577mr19917406637.14.1786042007934; Thu, 06 Aug 2026 11:46:47 -0700 (PDT) Received: from ?IPV6:2804:14d:8084:993e::75d? ([2804:14d:8084:993e::75d]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3158673be99sm48549554eec.15.2026.08.06.11.46.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Aug 2026 11:46:47 -0700 (PDT) Message-ID: <356f5e22-df20-43cd-ac1b-f2d6a85a0979@redhat.com> Date: Thu, 6 Aug 2026 15:46:44 -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, Guinevere Larsen 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: Xj_EC2ZIRUbfO7IrJiMAbdt1atn7bs7z_tl0ORWWdN8_1786042009 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)