From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id AHOINoKFXWjvhSAAWB0awg (envelope-from ) for ; Thu, 26 Jun 2025 13:38:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1750959490; bh=4sGG6sRwURqw34OMGFtdXv/7L/ydOuK+KjqcB8VcoGE=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=G014hetmbUSIG1mGwe2htLJH8Ir6+ZkBQ/ezUSunvCNsVLOndTiPWbVSBfIp9jegP V95X412XD3VHpJy/cw+T3p9qNnEN1b6WPpLoxnQJHCetUbtrpg/6YligNYTXPMxkjO FdCLLuiAB6shWNee0I1dHD2mkXHg6D4UPCi53q6g= Received: by simark.ca (Postfix, from userid 112) id D74B41E11E; Thu, 26 Jun 2025 13:38:10 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-9.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE autolearn=ham autolearn_force=no version=4.0.1 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=NCctZQ5G; dkim=pass (1024-bit key) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=sNlC9y6m; dkim-atps=neutral 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 72EE41E0C2 for ; Thu, 26 Jun 2025 13:38:10 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 233AD385C6EB for ; Thu, 26 Jun 2025 17:38:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 233AD385C6EB Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=NCctZQ5G; dkim=pass (1024-bit key) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=sNlC9y6m Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 952043854A88 for ; Thu, 26 Jun 2025 17:37:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 952043854A88 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 952043854A88 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1750959455; cv=none; b=ZRhmghGl3kPhi3WvOLBNU14Z6VvTD1KuVj2OCS3/KQwZP+cC3gL/bjFBadpwLmt4+aJkEYZGAdx+/iOC5vHANPT4eneQOY4FrHNVfpJ8yA8UVTHigVWyavHHO470ZvGv22iN1rSUWXDWSWXf76BWDsXMX8dn0ib4WaiKkzSeOWI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1750959455; c=relaxed/simple; bh=4sGG6sRwURqw34OMGFtdXv/7L/ydOuK+KjqcB8VcoGE=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version: Subject:To:From; b=OoUxzcy6Ot2XZwVWa6nnA2IB0+3Zt7WCoTEzDABMSPm+nhYpXmS9I6VKGoL83ZrlHTsqB965+DV3WVFCkZAQthPFIF1s3jgVv1Rwm7kQYBDt8hMC/auBvLUrkClXjJWJZDaP/gAFb9Beqn31qqOE2mAxqeBJRw8ku/PZPK85Kd4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 952043854A88 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1750959455; bh=4sGG6sRwURqw34OMGFtdXv/7L/ydOuK+KjqcB8VcoGE=; h=Date:Subject:To:References:From:In-Reply-To:From; b=NCctZQ5GORvYQAe3Zzd1Wy6qQmkuxVL4WoI3bmIIUPpu9+Y49eunn86EA7EwR4Yo1 zQLK3yl+2t0vkpIjSPN0Mftf7TNGcGTRz/i3lXwKiUStSl6DISSAmZQeowi8552QU5 06eHaB6esckOthMKEVj+xrLEUlkiyQsnSZNO0CpY= Received: by simark.ca (Postfix, from userid 112) id 05A571E11F; Thu, 26 Jun 2025 13:37:35 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1750959453; bh=4sGG6sRwURqw34OMGFtdXv/7L/ydOuK+KjqcB8VcoGE=; h=Date:Subject:To:References:From:In-Reply-To:From; b=sNlC9y6mrbf2aoj9vPUqzvhtWD5NwOerKIem7k9GnDWkv6lnMFdyypkQ6L+XwSd/b maupX6CCnXbcKnaVsXCIAbkHG6h/D0fVkiZJNKBFEhjjZbawhVUMgZEu2R1zFEBx9r 3xfOPVeSNifxWLhXTSa62IHIhAk5bkK2Ul9oV0+M= Received: from [10.0.0.11] (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id AAB2D1E0C2; Thu, 26 Jun 2025 13:37:33 -0400 (EDT) Message-ID: Date: Thu, 26 Jun 2025 13:37:33 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 5/6] gdb/progspace: add solib_ops pointer in program_space To: Pedro Alves , Simon Marchi , gdb-patches@sourceware.org References: <20250616193443.16703-1-simon.marchi@efficios.com> <20250616193443.16703-5-simon.marchi@efficios.com> <99a1325c-d9f6-4862-aacb-16f3433ccede@palves.net> Content-Language: en-US From: Simon Marchi In-Reply-To: <99a1325c-d9f6-4862-aacb-16f3433ccede@palves.net> Content-Type: text/plain; charset=UTF-8 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 On 2025-06-20 14:19, Pedro Alves wrote: > On 2025-06-16 20:33, Simon Marchi wrote: >> New in v3: >> >> - add some ops nullptr checks in print_solib_list_table and >> info_linker_namespace_command >> >> The subsequent C++ification patch in this series will allocate one >> instance of solib_ops per program space. That instance will be held in >> struct program_space. As a small step towards this, add an `solib_ops >> *` field to `struct program_space`. This field represents the solib_ops >> currently used to manage the solibs in that program space. Initialize >> it with the result of `gdbarch_so_ops` in `post_create_inferior`, and >> use it whenever we need to do some solib stuff, rather than using >> `gdbarch_so_ops` directly. >> >> The difficulty here is knowing when exactly to set and unset the solib >> ops. What I have here passes the testsuite on Linux, but with more >> testing we will probably discover more spots where it's needed. > > One important detail is keeping the solibs listed after the inferior exits. > This is so the user can set breakpoints in shared library symbols for the > next re-run. > > Your patches preserve that, which is good. I don't recall off hand if there's > a testcase ensure it. > > Tiny nit below. Other than that: > > Approved-By: Pedro Alves > >> diff --git a/gdb/progspace.h b/gdb/progspace.h >> index 5e5d5edd9b4b..abb448195d74 100644 >> --- a/gdb/progspace.h >> +++ b/gdb/progspace.h >> @@ -231,6 +231,23 @@ struct program_space >> is outside all objfiles in this progspace. */ >> struct objfile *objfile_for_address (CORE_ADDR address); >> >> + /* Set this program space's solib provider. >> + >> + The solib provider must be unset prior to call this method. */ > > > "prior to call" -> prior to calling" Thanks, fixed. Simon