From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 7cTQKR3IumqyehMAWB0awg (envelope-from ) for ; Mon, 28 Sep 2026 16:03:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1790625821; bh=OFjDqAx2bZCrstXH6uejLG5zkzAJC0N4QMHUWkWZanQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=QNDNyyqFj9KyTj89O40Qi15ZE88HigGR8h7a57RNSXhAScD5m6pN7qVAnJt+VzqjU CCNAHi70w/G4vLNTfpLSc0FEHI1+RVu+ITfj08w0vGpG2oGBAwr9xDaz6j2wfOpFvl eLDbzH6vnCNIPHTUnJTmnbf+I+518zBfRtztW4QA= Received: by simark.ca (Postfix, from userid 112) id 9886D1E01F; Mon, 28 Sep 2026 16:03:41 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.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 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=MWAlEgTd; dkim-atps=neutral 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 EC65C1E01F for ; Mon, 28 Sep 2026 16:03:40 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CBB394B9DB63 for ; Mon, 28 Sep 2026 20:03:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CBB394B9DB63 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=MWAlEgTd Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id DEB514BA798F for ; Mon, 28 Sep 2026 20:03:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DEB514BA798F 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 DEB514BA798F Authentication-Results: sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790625794; cv=none; b=OVivj3XdUJ8vlSKdNrpXNdzyK1QRmZ4JXC/hBumxMW5MP7t1fIQf19yhtK8i31r76150GbXWXLpHgQns8DGez1hAl49aGkimqsmwNY6Dc5dZhB08WTfHdfTwjSKadf4Z9VuIaO5BGRqTuOjK0ZNd/5igQ77tR8dxAta2IcqHOmc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790625794; c=relaxed/simple; bh=OFjDqAx2bZCrstXH6uejLG5zkzAJC0N4QMHUWkWZanQ=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=Cfm21MFuqJtODn+OlabzPD9EoiPrWQfML7ct22dEWHKb/wyeeQ5UwjZ3xDNJVxy0KeP0vsMWz8iXnzqxKBptNAo/KtG+jpLHk90VAZNaaPlJ1lwwWqyckA2Zs+pNbqNaOYfjY8PAbS2Ilqv0MzNkgTOLi5H6d+ntWNSiYtHaVYw= ARC-Authentication-Results: i=1; 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=MWAlEgTd DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DEB514BA798F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1790625791; bh=OFjDqAx2bZCrstXH6uejLG5zkzAJC0N4QMHUWkWZanQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=MWAlEgTdEeRhXassBr6XedwowqmUDc6RMJdSYcw3wGyp1zLimmKyGUtUFX3obeLcS EuATo/TbrqrO93ep9TFMtpADJEv4GpIS1p+cn3fiE6zBQpGzJwUZzaved+ERlm0yyZ ALpx/MT7qU/x24zDRhj4qo/fIlmoAOdZdWHCPclw= Received: by simark.ca (Postfix) id 40CB51E01F; Mon, 28 Sep 2026 16:03:11 -0400 (EDT) Message-ID: Date: Mon, 28 Sep 2026 16:03:10 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdb: Implement stop-on-solib-events for GPU code objects To: Bratislav Filipovic , gdb-patches@sourceware.org Cc: luis.machado.foss@gmail.com, Lancelot.Six@amd.com, TankutBaris.Aktemur@amd.com, pedro@palves.net References: <20260924130451.89610-1-bfilipov@amd.com> Content-Language: fr From: Simon Marchi In-Reply-To: <20260924130451.89610-1-bfilipov@amd.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 On 9/24/26 9:04 AM, Bratislav Filipovic wrote: > GDB's "set stop-on-solib-events 1" setting allows users to stop execution > when shared libraries are loaded or unloaded, enabling inspection and > breakpoint placement before library code executes. This feature works for > CPU shared libraries but is not working for GPU code objects loaded by the > AMD ROCm runtime. > > This commit implements stop-on-solib-events support for GPU code objects, > making GPU code object load/unload events behave consistently with CPU > shared library events. > > The root cause is in amd_dbgapi_target_breakpoint::check_status(), which > unconditionally sets bs->stop = 0 and bs->print_it = print_it_noop, > regardless of the stop_on_solib_events setting. This is in contrast to > internal_breakpoint::check_status() for CPU shared libraries, which > respects the setting. > > The fix includes: > > 1. Generalize print_solib_event() function to eliminate code duplication > between CPU and GPU event printing. The function now accepts parameters > for event description, field names, and plural forms. This reduces > ~50 lines of duplicated code. You indeed generalized print_solib_event, but amd_dbgapi_target_breakpoint::print_it still contains the duplicated code, and doesn't use print_solib_event. I guess you are missing a piece of the change. Simon