From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id oT10HPh1fGoxkyAAWB0awg (envelope-from ) for ; Wed, 12 Aug 2026 09:32:40 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=eQetbvqz; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 706881E033; Wed, 12 Aug 2026 09:32:40 -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 E33871E033 for ; Wed, 12 Aug 2026 09:32:39 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B5FBB4BB24FE for ; Wed, 12 Aug 2026 13:32:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B5FBB4BB24FE Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=eQetbvqz Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by sourceware.org (Postfix) with ESMTPS id AB50A4B9700C for ; Wed, 12 Aug 2026 13:30:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AB50A4B9700C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AB50A4B9700C Authentication-Results: sourceware.org; arc=none smtp.remote-ip=192.198.163.12 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786541409; cv=none; b=IH97n5EOqqpXr2BABjlhTkPl3IGs0yE6/lpzjglAwZx1Vft7tcn3HhgaPomiZ2QRtLQEM0VqrNVInYekCl0wQzzeWshStqmMF1PdRHG2kgIJq3RqSmf34GRCiYEIhtedecd85aHE+JK4yIRbuePHrXi4nRZ5EmdrM98wCRTnqYE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786541409; c=relaxed/simple; bh=O+5w3KE43r2YhX+c/LFUrFP/tu6E21h7JWYhJXIkBA8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=fiT4J9A48531Q+uwD8hPfygn1rXpKcqefHLXxIlCUbglsqWnIyhyjKgPSYZ2PxfJdjkjUeiBtwEO+2G1fQCs94r6DR6oa/fJXaeQZzCopseVbBgPSxJuqkQIKEDUZQ7B6P7N2HMhVzP89zm5GmCXIUqTtU6gi33oI3JTY+lWlDQ= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=eQetbvqz DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AB50A4B9700C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1786541409; x=1818077409; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=O+5w3KE43r2YhX+c/LFUrFP/tu6E21h7JWYhJXIkBA8=; b=eQetbvqzhNQOG1+d4A65DAVzzQKXK3kIE4/oCA6mj4WJzNXIF3iA6wzk bPEaRQo66axzBqjlOMoqFWtFk4mj+MAhJDuWD9C1rfIm+80H6ftRNgYfF hK1ic/Y/Vp+4AkZTurOBcVffkWCtdo+o1bgVrqXNhzq3j6VLmdEvDOs57 8uGJGzWwdltzHrjppVA2fMs2KPaDpUoIaad02cK2lC4HBcpaEk99KMUWN o3PPrR8D54y5NEri0UDKiteF/B8n8iRSNkZ72NF11+bpJ1ODVhCJ2ucZO a35qqWfV2ynXIcXVykSkJv7Fd7jj4bowoqT0YFS+58QcGVSCQDWzw3USx A==; X-CSE-ConnectionGUID: e+5Kai/1ToayGZ2v2bZTVA== X-CSE-MsgGUID: 9nTI7by6RTWLmEUFkgL1qg== X-IronPort-AV: E=McAfee;i="6800,10657,11872"; a="90910781" X-IronPort-AV: E=Sophos;i="6.25,219,1779174000"; d="scan'208";a="90910781" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2026 06:30:08 -0700 X-CSE-ConnectionGUID: ipw694LMScGklmEZLebYIg== X-CSE-MsgGUID: QuElNK/gShmRqLKQBERtGA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,219,1779174000"; d="scan'208";a="268804785" Received: from gkldtt-dev-004.igk.intel.com (HELO localhost) ([10.123.221.202]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2026 06:30:07 -0700 From: Markus Metzger To: gdb-patches@sourceware.org Cc: Tankut Baris Aktemur Subject: [PATCH v4 38/44] testsuite, sycl: add test for 'info locals' and 'info args' Date: Wed, 12 Aug 2026 15:27:58 +0200 Message-ID: <20260812132805.380163-39-markus.t.metzger@intel.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260812132805.380163-1-markus.t.metzger@intel.com> References: <20260812132805.380163-1-markus.t.metzger@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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 From: Tankut Baris Aktemur Test that local variables and arguments inside a SYCL kernel can be displayed correctly. --- .../gdb.sycl/info-locals-and-args.exp | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 gdb/testsuite/gdb.sycl/info-locals-and-args.exp diff --git a/gdb/testsuite/gdb.sycl/info-locals-and-args.exp b/gdb/testsuite/gdb.sycl/info-locals-and-args.exp new file mode 100644 index 00000000000..f2b446daef8 --- /dev/null +++ b/gdb/testsuite/gdb.sycl/info-locals-and-args.exp @@ -0,0 +1,78 @@ +# Copyright 2019-2026 Free Software Foundation, Inc. +# +# 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 . +# +# Tests GDBs support for SYCL for the "info locals" and "info args" +# commands inside a kernel. + +load_lib sycl.exp + +standard_testfile call-stack.cpp + +set sycl_device_list [init_sycl_devices_list] +if {[llength $sycl_device_list] == 0} { + unsupported "target does not support SYCL" + return +} + +if {[build_executable "failed to compile $srcfile" "$binfile" "$srcfile" \ + {sycl debug}]} { + return +} + +foreach device $sycl_device_list { + sycl_with_intelgt_lock $device { + clean_restart $testfile + + if {![sycl_start $device]} { + continue + } + + set outer_loc [gdb_get_line_number "ordinary-outer-loc"] + set inner_loc [gdb_get_line_number "kernel-function-return"] + gdb_breakpoint "$outer_loc" + gdb_breakpoint "$inner_loc" + + gdb_continue_to_breakpoint "bp 1" ".*$srcfile:$outer_loc.*" + + set fill "\[^\r\n\]+" + set ten 0 + set four 0 + set fourteen 0 + gdb_test_multiple "info locals" "info locals 1" -lbl { + -re "\r\nten = $fill" { + set ten 1 + exp_continue + } + -re "\r\nfour = $fill" { + set four 1 + exp_continue + } + -re "\r\nfourteen = $fill" { + set fourteen 1 + exp_continue + } + -re -wrap "" { + gdb_assert { $ten == 1 && $four == 1 && $fourteen == 1 } \ + $gdb_test_name + } + } + + gdb_continue_to_breakpoint "bp 2" ".*$srcfile:$inner_loc.*" + gdb_test "info locals" "result = $fill.*" "info locals 2" + gdb_test "info args" [multi_line \ + "x1 = $fill" \ + "y1 = $fill"] + } +} -- 2.43.0 ________________________________________ Intel Deutschland GmbH Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany Tel: +49 (89) 99143-0 www.intel.de Managing Directors: Candice Moore, Jeffrey Schneiderman, Ramachandran Sitaraman Chairperson of the Supervisory Board: Sonja Pierer Registered Seat: Munich Commercial Register B: Amtsgericht Munich HRB 186928 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.