From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 9tf8L1T7vWeodT0AWB0awg (envelope-from ) for ; Tue, 25 Feb 2025 12:18:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1740503892; bh=QcBySqwsj/giR+elnL57i/aXE7t2Ea098pfO4EE9uaY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=k0LQosplSgegrmc/9llgAoTaV7K7ULGDzAfGdWbm1+s+xzD5CpOs5+KZ6sHRt3G/4 w6USUSAOIxq2vtOqLYziq56C9wCFgt/dAB3heQyJ0Nc8z5Szt3WLe1OPI6nMMgm/C8 8NPb7QkMcGZVJch4ThhgsTZscHTgMOs/94To/gdE= Received: by simark.ca (Postfix, from userid 112) id B198B1E105; Tue, 25 Feb 2025 12:18:12 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) 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=unavailable autolearn_force=no version=4.0.0 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=BMY+YCJD; dkim=pass (1024-bit key) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=RHecpxmM; 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 123F51E05C for ; Tue, 25 Feb 2025 12:18:12 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8CC003858C42 for ; Tue, 25 Feb 2025 17:18:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8CC003858C42 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=BMY+YCJD; dkim=pass (1024-bit key) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=RHecpxmM Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 87E203858C41 for ; Tue, 25 Feb 2025 17:17:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 87E203858C41 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 87E203858C41 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=1740503854; cv=none; b=xI/+2RlHA/Q/DR0JObD3Fr4NQBKtM/nvzhULmfmVGoSAXZm4eqfWGTGGUGWfO5liLq7a+SLz1+J8B+8xOeaJj5V8po0rh5698RPbAly1b1rM3el4FlX6ff1edhjgc8jwUmo/1peLRnX0zRvEWOc71gzRNvnZDoISWsBtL01QrUM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1740503854; c=relaxed/simple; bh=QcBySqwsj/giR+elnL57i/aXE7t2Ea098pfO4EE9uaY=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version: Subject:To:From; b=gSCnzHCCBtJBK5SlmehknvgV5/D9YSwf0sC+8jvDx1luMkYKXBldlxXYUTSwPTgcJbMylKPHE0P8I/E2NO4+e4v/ZiPjbjoFDjMogUmYwGGranpjP48BsJFNolc+W3u8m/ai7QzSVEmYJ2fGMT/mk6Lc72tmAkkZ9vcMsNkKe+I= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 87E203858C41 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1740503854; bh=QcBySqwsj/giR+elnL57i/aXE7t2Ea098pfO4EE9uaY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=BMY+YCJDYfo0UzkdncdChXKpvkMCNtRQ73H+O6clZhMglejXcDRmdf81thp4T/jxK kX0Yx6Kptu2d9rt0XWncNqu/4oVV5Gkf4T9U/oJZx/rY/vMFLohDFdAK8AumMStmf0 LSnsAOSyNyKiLAldKnsDyo416RiO/kIsirEw4wL8= Received: by simark.ca (Postfix, from userid 112) id 45AB11E114; Tue, 25 Feb 2025 12:17:34 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1740503852; bh=QcBySqwsj/giR+elnL57i/aXE7t2Ea098pfO4EE9uaY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=RHecpxmMQnZMELCyZWMY0l6K43XMr8342Iy0/FGkQ2ps8iNlTzAWHiUAuh5E1GbM+ WOCiZsFZ7jS3FL8ffeuNcCkypNGoDS8H4RoIti/WsDYO8eyY5YnBay9JjWkrJOOa5R QlKDS0RaJ/fp8ZUOXL+Ab1xZ3IK6SDXvkMTsCKhg= Received: from [172.16.0.106] (96-127-217-162.qc.cable.ebox.net [96.127.217.162]) (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 E3C611E05C; Tue, 25 Feb 2025 12:17:31 -0500 (EST) Message-ID: <35bd1056-81ed-4b9f-ba75-b098eaae6e06@simark.ca> Date: Tue, 25 Feb 2025 12:17:31 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/3] gdb/amd-dbgapi: add displaced stepping support To: Simon Marchi , Lancelot SIX , gdb-patches@sourceware.org Cc: Simon Marchi References: <20250114191818.2393132-1-simon.marchi@polymtl.ca> <20250114191818.2393132-4-simon.marchi@polymtl.ca> <8097b8ac-7d99-4472-bc59-599a358e8ede@amd.com> <9018b77a-df87-49d5-ad26-2d84fe4789f7@polymtl.ca> Content-Language: fr From: Simon Marchi In-Reply-To: <9018b77a-df87-49d5-ad26-2d84fe4789f7@polymtl.ca> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 1/15/25 1:45 PM, Simon Marchi wrote: >>> diff --git a/gdb/testsuite/gdb.rocm/displaced-stepping.exp b/gdb/testsuite/gdb.rocm/displaced-stepping.exp >>> new file mode 100644 >>> index 000000000000..6b26e1adfd7a >>> --- /dev/null >>> +++ b/gdb/testsuite/gdb.rocm/displaced-stepping.exp >>> @@ -0,0 +1,54 @@ >>> +# Copyright 2024 Free Software Foundation, Inc. >> >> Should probably 2025. > > Fixed. > >>> + >>> +# This program is free software; you can redistribute it and/or modify >>> +# it under the terms of the GNU General Public License as published by >>> +# the Free Software Foundation; either version 3 of the License, or >>> +# (at your option) any later version. >>> +# >>> +# This program is distributed in the hope that it will be useful, >>> +# but WITHOUT ANY WARRANTY; without even the implied warranty of >>> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >>> +# GNU General Public License for more details. >>> +# >>> +# You should have received a copy of the GNU General Public License >>> +# along with this program. If not, see . >>> + >>> +# Test displaced stepping on AMD GPUs. >>> + >>> +load_lib rocm.exp >>> + >>> +standard_testfile simple.cpp >> >> I though the usage in GDB testsuite was to not share the .cpp across multiple testcases. Should there be a displaced-stepping.cpp? > > For "hello world" style programs (which this one is) I don't really > mind. But I will add displaced-stepping.cpp. > >> >>> + >>> +require allow_hipcc_tests >>> + >>> +# Since GDB doesn't yet understand DWARF expressions generated by the HIP >>> +# compiler, purposefully generate the binary without debug info. >>> +if {[build_executable "failed to prepare" $testfile $srcfile {hip}]} { >>> + return >>> +} >>> + >>> +proc do_test {} { >>> + clean_restart $::binfile >>> + >>> + with_rocm_gpu_lock { >>> + if ![runto_main] { >>> + return >>> + } >>> + >>> + gdb_test "with breakpoint pending on -- break do_an_addition" \ >>> + "Breakpoint $::decimal \\(do_an_addition\\) pending." >>> + >>> + gdb_test "continue" \ >>> + "Thread $::decimal hit Breakpoint $::decimal, $::hex in do_an_addition.*" >>> + >>> + gdb_test_no_output "set debug displaced on" >>> + >>> + gdb_test "stepi" "displaced_step_prepare_throw: prepared successfully.*$::hex in do_an_addition.*" >> >> Just to reduce the noise in the gdb.log file when running the continue, this could be >> >> gdb_test "with debug displaced on -- stepi" ... > > Good idea, I never remember to use "with". Done. > >> >>> + >>> + gdb_test "continue" \ >>> + "Inferior 1 .* exited normally.*" \ >>> + "continue to end" >>> + } >>> +} >>> + >>> +do_test >>> -- >>> 2.47.1 >>> >> >> With those minor comments addressed, and given that it only touches amdgpu related code, >> Approved-By: Lancelot Six (amdgpu) > > Thanks, added. > > Simon I pushed the series. Simon