From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id IFwYL8jZ8GkDSAEAWB0awg (envelope-from ) for ; Tue, 28 Apr 2026 12:01:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1777392072; bh=kaEpR3npg1MB3JGj05uyGv9dOXL0C1iBIhnawH+Zy1Q=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ZBi6zalCM2m89bDMlsYIxklrnEebQ88RSuO9RWRIuo6xu+dJMbX55h7yH90OLiamI msMllqoDVIEy0nP8h1tMO+8OBNn3CGZvWDPRKblHkAWZUxoH00ZWytcQzGUfoqDlGD 0EAsi4hBIE3x00x/An8SgQ/tm4WFsXtGdMmrH8MI= Received: by simark.ca (Postfix, from userid 112) id AD5D61E0BA; Tue, 28 Apr 2026 12:01:12 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 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_MSPIKE_H2,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED 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=tXt2gN9M; dkim-atps=neutral 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 D37671E067 for ; Tue, 28 Apr 2026 12:01:09 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 54D3C4BB8F4D for ; Tue, 28 Apr 2026 16:01:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 54D3C4BB8F4D 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=tXt2gN9M Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 7DFF64B920C2 for ; Tue, 28 Apr 2026 16:00:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7DFF64B920C2 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 7DFF64B920C2 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=1777392039; cv=none; b=cNi2Vxh+NXeRSeXqXzqSDnOlCuQAO9kGm2WQEUrVtRFSXt1llcXYpojbI/23wXRvBRncPtdHiPH1CXQTS+zht867ggOHKlslXzpHbgzWzuitVZABLOdUSwiUL9AzgD98EOb4pyKCUYZfbo8CRnPOlDjCfP7ox57siB3ErTcd140= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777392039; c=relaxed/simple; bh=kaEpR3npg1MB3JGj05uyGv9dOXL0C1iBIhnawH+Zy1Q=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=Dr9rYfx5Ndg1k4osAk86CtEffgr7jooa1u1ExQrHOXJ8E75LskVBL4WFRIqvAMgQ5jWcDIs6hV51a6ZiZkQhz3ofnJfb6eIzwQSf/QZrIMIRb/nzBw7sY50hwpBZNT08vu8XaYjiYsJ4ylBD3PuL+M4GIy22Qm7g6Zoc02N0qTE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7DFF64B920C2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1777392038; bh=kaEpR3npg1MB3JGj05uyGv9dOXL0C1iBIhnawH+Zy1Q=; h=Date:Subject:To:References:From:In-Reply-To:From; b=tXt2gN9Mq5lrJw0zqguAMnpeebprbLjpM3OHWnJ90cDiDuON0jUQmSHP/WFtgjdmv VVFopuq0F0T0H+7QxmeoNRlIkASp48sYApKKzPDfXmxuMoFQT6eWIeofJK9dgQ4qF/ 82m/C2Z6Alb4mP3e1PC7NgkeGoyi7IW71yCvibFg= Received: by simark.ca (Postfix) id 4AC581E067; Tue, 28 Apr 2026 12:00:38 -0400 (EDT) Message-ID: Date: Tue, 28 Apr 2026 12:00:37 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 00/11] Multiple solib_ops in a program_space To: Simon Marchi , gdb-patches@sourceware.org References: <20251209193610.296085-1-simon.marchi@efficios.com> Content-Language: fr From: Simon Marchi In-Reply-To: <20251209193610.296085-1-simon.marchi@efficios.com> 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 Ping. On 12/9/25 2:32 PM, Simon Marchi wrote: > This series adds support for having multiple solib_ops instances > providing solibs for a given program_space. The main use case to > justify this change is to make rocm_solib_ops less clunky. > > When debugging ROCm programs, we need to have an instance of > svr4_solib_ops providing solibs for host shared libraries, and > an instance of rocm_solib_ops providing solibs for device code objects. > Since there can only be one solib_ops in a program, rocm_solib_ops has > to wrap and replce the svr4_solib_ops instance previously installed. > > By allowing multiple solib_ops in the same program_space, the two > solib_ops instances can co-exist without knowing each other. > > The main change is contained in the last patch. The patches before that > are cleanup or preparatory patches. > > Simon Marchi (11): > gdb/solib-rocm: assert that host ops isn't rocm_solib_ops > gdb/solib: use early return in solib_read_symbols > gdb/solib-rocm: pass reference to cache to > rocm_code_object_stream_file > gdb/solib-rocm: add cached_fd to manage cached fd lifetime > gdb: de-constify some methods of solib_ops > gdb/solib-rocm: move per-inferior data to rocm_solib_ops > gdb/solib-rocm: save inferior in rocm_solib_ops > gdb/solib: add remove_solib function > gdb: add objfile -> solib backlink > gdb: change default objfile iteration order to start with current > objfile > gdb: multiple solib_ops per program space > > gdb/amd-dbgapi-target.c | 3 +- > gdb/infcmd.c | 16 +- > gdb/inferior.h | 6 +- > gdb/infrun.c | 7 +- > gdb/objfiles.h | 23 ++ > gdb/observable.h | 8 +- > gdb/progspace.c | 91 +++++- > gdb/progspace.h | 57 +++- > gdb/solib-aix.c | 14 +- > gdb/solib-darwin.c | 14 +- > gdb/solib-dsbt.c | 10 +- > gdb/solib-frv.c | 10 +- > gdb/solib-rocm.c | 348 +++++++++----------- > gdb/solib-svr4.c | 60 ++-- > gdb/solib-svr4.h | 20 +- > gdb/solib-target.c | 4 +- > gdb/solib-target.h | 2 +- > gdb/solib.c | 393 +++++++++++++---------- > gdb/solib.h | 50 ++- > gdb/target.c | 2 +- > gdb/testsuite/gdb.rocm/symbol-lookup.cpp | 320 ++++++++++++++++++ > gdb/testsuite/gdb.rocm/symbol-lookup.exp | 243 ++++++++++++++ > gdb/windows-tdep.c | 46 +-- > 23 files changed, 1221 insertions(+), 526 deletions(-) > create mode 100644 gdb/testsuite/gdb.rocm/symbol-lookup.cpp > create mode 100644 gdb/testsuite/gdb.rocm/symbol-lookup.exp > > > base-commit: bfc430c99b66ab12643a65388c4ace925ebd68b2 > -- > 2.52.0 >