From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id kfBKFgPZX2qjyyEAWB0awg (envelope-from ) for ; Tue, 21 Jul 2026 16:39:31 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=sd0GFV1G; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 527A71E09E; Tue, 21 Jul 2026 16:39:31 -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,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=unavailable 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 3A08E1E033 for ; Tue, 21 Jul 2026 16:39:30 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DF8854BA2E2B for ; Tue, 21 Jul 2026 20:39:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF8854BA2E2B Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=sd0GFV1G Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by sourceware.org (Postfix) with ESMTPS id 5FA664BA2E2C for ; Tue, 21 Jul 2026 20:38:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5FA664BA2E2C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5FA664BA2E2C Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::42a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784666334; cv=none; b=UlLr2bui2r2oCYXyXXxQUFSOvOo6nRq4OU8g7VrRDqojUzDnibJUms9DHjiZdDc40utA+bzd/6R11f8LvuwGXZUQ08XMWC6ZLwZsZfeA01FSKjVAM2MH1dPzXkN/hsJt2sLz6Gwjffzog8j38hDmjrZF7vJnNR3y3E2+/1Dpe+0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784666334; c=relaxed/simple; bh=pgtzTAIw09hVjQLN9mCXiXMB23/QDRQus9ejJh8XxsY=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=c7Ob61RsOqy0ijVHC/vijnomq14uif+lUd7du2Cp0mmrOmT1tt0nwnZHOu5Cz0hKg81SSYjLjmii/aU57ouAGrDgikYF3WmT81O/6p421isRPiCCLnuhIuHD09VHr1k8AaLw7nCaju+uPGzCgc0cfhJmsrK0mSHTIH+u6p4TM6E= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=sd0GFV1G DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5FA664BA2E2C Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-47f84023916so329908f8f.3 for ; Tue, 21 Jul 2026 13:38:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784666333; x=1785271133; darn=sourceware.org; h=content-transfer-encoding:content-type:in-reply-to:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=CVDFYJoRcqNtx3eTjQFj2VAZTHIHAK7Oa+D1muMWiyw=; b=sd0GFV1GToV4NUtTvIeQ/IbdssQrppXi0bRMIvsYh0+AEhYitfRUUBzt4dkp008ywg gG97XLtaEyGl01aOT52zho70vZ3Xanaq+o9JM4W+kKIzMBt58PBf0FiQPvxBLtjzQe2E ca2egxwv3PzHnQrmZBJhwJcrrVHbXxdZ1qVUaSVYxkhZpMSEX0bZ1IM4YK01My23lRMP o/zZw73DMfdVCqNQSmLxYgqudTTnHk5G0+jsfeDK69sTUQU5TJW1RzoIpqAvQv658Ho8 DYdlqDC+gdjjr0jxofmYzyJk1knt7JjXh4SAefHcub2Tjntbcj4zzwLRUgRzUU2BRLuR uPzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784666333; x=1785271133; h=content-transfer-encoding:content-type:in-reply-to:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=CVDFYJoRcqNtx3eTjQFj2VAZTHIHAK7Oa+D1muMWiyw=; b=cnyDb0L/6WOtwfbfYKuvDjdA7OIwPgaQCEPDRL/sf43nhz2me8YhXI6XRKWdsWCj68 1/906yq/9dWYzbBpUrjxuOeRHvBXHntU1ILg4TD3JsdbyadscL8TVGsUVQt1K3NHPb7B JtguujHpPnhiSgiBOr4ip8PTA4j2crrtg9n4oNFX9/pqvtHwAlpqfxM3n08ndr03SmS1 4kwlV+Ch/hcSY2n6JVyw5Z7jmhOWKwD9aeT5H9eknjzjXsSlyaj6lnvqRbEa0peXynWb MA7dDOEO5W9mRuiyIfMNilveBcjUW/caPl1fdcLSjOuzjK3xP7hTZrpmlX7CmfOxgj/P R9FQ== X-Forwarded-Encrypted: i=1; AHgh+RrmN1E9WFf0yK5RiWi2ZZB39ix3CCKVe0AiTti/bYuYJoaLmWaLy69fK3L+d2Y62oWFA5NbycGeZ7Jxpw==@sourceware.org X-Gm-Message-State: AOJu0YwpVzJn9a2Znuy9l7XHR7aYtRYZP32wOb8SPMKq2iM7hs1VlHtT FX423m2Ljh+elcZzrOQ97sxLMfgB9+N2MxVGnqXUcmkXgRtZw1ZbXJ/IJvkXZQ== X-Gm-Gg: AR+sD12fb2soHBrm+e9ZpmqOrCXfLG+UYKlCYJh54LASBhvoqkz6xiooJO+R/QtPFLN MKGl+1Spxbis/qbiQXhI0Fb7FvX+SIFEcgrsgKh4eJhNeS8BZ/V8n2YIGP0STASPE2g8C9YX//n iO9kyxqY8AzXG3JigQKLGYHTdC5EoC/0gT3UkWkRHtE4Y9NlUISrXp76ptahWeiRRNk6j3L4psu Og5W1fuRdDcHjX4C/UfqfeJH3dV+ibappXmfJr6Zz3pmmFsobfJJKwxJdAFOKcFtLfRf0j3Fz/u e/0EC7X2brPRHxxr3aI6HUbSO45/TH5URs6p6kE9kaGBAH7mAK1toNpEhLWKnCHvWFuzmVEg1eF DMNv5WdZkAmEjck5NCCax39pzKUcMiKpmWWOGJJCyFANxkm1jAJ3DIZMF5mruYXC+ggH32ENrBE 1Em3JJKQuTMFYmjkk= X-Received: by 2002:a05:6000:40dc:b0:47f:8487:a699 with SMTP id ffacd0b85a97d-47f8487a83bmr744291f8f.24.1784666333069; Tue, 21 Jul 2026 13:38:53 -0700 (PDT) Received: from [192.168.0.38] ([86.12.216.189]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f63e49ce4sm42191594f8f.8.2026.07.21.13.38.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Jul 2026 13:38:52 -0700 (PDT) Message-ID: <5e67174f-9f85-4d68-b708-fe0b2309a3f4@gmail.com> Date: Tue, 21 Jul 2026 21:38:51 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 5/5] [PATCH 5/5] gdb/testsuite: Add FEAT_S1POE testcases Content-Language: en-US To: srinath.parvathaneni@arm.com, gdb-patches@sourceware.org Cc: guinevere@redhat.com, thiago.bauermann@linaro.org, Ezra.Sitorus@arm.com, Matthieu.Longo@arm.com, simark@simark.ca References: <20260714201530.78374-1-srinath.parvathaneni@arm.com> <20260714201530.78374-6-srinath.parvathaneni@arm.com> From: Luis In-Reply-To: <20260714201530.78374-6-srinath.parvathaneni@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed 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 14/07/2026 21:15, srinath.parvathaneni@arm.com wrote: > From: Srinath Parvathaneni > > Add testcases for POR_EL0 register access, SIGSEGV diagnostics, fix-and-continue > support (updating $por_el0 after SIGSEGV and continuing with signal 0), and core > file support. > --- > gdb/testsuite/gdb.arch/aarch64-poe-core.exp | 101 ++++++++++++++++++ > gdb/testsuite/gdb.arch/aarch64-poe-sigsegv. | 0 > gdb/testsuite/gdb.arch/aarch64-poe-sigsegv.c | 52 +++++++++ > .../gdb.arch/aarch64-poe-sigsegv.exp | 58 ++++++++++ > gdb/testsuite/gdb.arch/aarch64-poe.c | 29 +++++ > gdb/testsuite/gdb.arch/aarch64-poe.exp | 46 ++++++++ > gdb/testsuite/lib/gdb.exp | 55 ++++++++++ > 7 files changed, 341 insertions(+) > create mode 100644 gdb/testsuite/gdb.arch/aarch64-poe-core.exp > create mode 100644 gdb/testsuite/gdb.arch/aarch64-poe-sigsegv. Stray file. Please remove. > create mode 100644 gdb/testsuite/gdb.arch/aarch64-poe-sigsegv.c > create mode 100644 gdb/testsuite/gdb.arch/aarch64-poe-sigsegv.exp > create mode 100644 gdb/testsuite/gdb.arch/aarch64-poe.c > create mode 100644 gdb/testsuite/gdb.arch/aarch64-poe.exp > > diff --git a/gdb/testsuite/gdb.arch/aarch64-poe-core.exp b/gdb/testsuite/gdb.arch/aarch64-poe-core.exp > new file mode 100644 > index 00000000000..22fe646ac43 > --- /dev/null > +++ b/gdb/testsuite/gdb.arch/aarch64-poe-core.exp > @@ -0,0 +1,101 @@ > +# Copyright (C) 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 . > + > +# This file is part of the gdb testsuite. > + > +# Test generating and reading a core file with POR_EL0. > + > +proc check_poe_core_file {core_filename} { > + # Load the core file. > + if { > + [gdb_test "core $core_filename" \ > + [multi_line \ > + "Core was generated by .*" \ > + "Program terminated with signal SIGSEGV, Segmentation fault" \ > + "Protection Key Violation while accessing address ${::hex} with Protection Key = ${::decimal}\\." \ > + "#0 ${::hex} in main \\(.*\\) at .*" \ > + ".*buf\\\[0\\\] = 42;.*"] \ > + "load core file"] > + } { > + untested "failed to load core file" > + return -1 > + } > + > + # Check the value of POR_EL0 in the core file. > + gdb_test "print/x \$por_el0" " = 0x37" \ > + "por_el0 contents from core file" > +} > + > +require allow_aarch64_poe_tests > + > +standard_testfile aarch64-poe-sigsegv.c > + > +if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} { > + return > +} > + > +set binfile [standard_output_file ${testfile}] > + > +if {![runto_main]} { > + return > +} > + > +set poe_crash_re [multi_line \ > + "Program received signal SIGSEGV, Segmentation fault" \ > + "Protection Key Violation while accessing address ${::hex} with Protection Key = ${::decimal}\\." \ > + ".*buf\\\[0\\\] = 42;.*"] > + > +gdb_test_multiple "continue" "run to POE crash" { > + -re "$poe_crash_re$gdb_prompt $" { > + pass $gdb_test_name > + } > + > + -re ".*exited with code 01.*$gdb_prompt $" { > + unsupported "POE userspace support unavailable" > + return > + } > +} > + > +# Generate the gcore core file. > +set gcore_filename [standard_output_file "${testfile}.gcore"] > +set gcore_generated [gdb_gcore_cmd "$gcore_filename" "generate gcore file"] > + > +# Generate a native core file. > +set core_filename [core_find ${binfile}] > +set core_generated [expr {$core_filename != ""}] > + > +# At this point we have a couple core files, the gcore one generated by GDB > +# and the native one generated by the Linux Kernel. Make sure GDB can read > +# both correctly. > + > +if {$gcore_generated} { > + clean_restart > + gdb_load ${binfile} > + with_test_prefix "gcore corefile" { > + check_poe_core_file $gcore_filename > + } > +} else { > + fail "gcore corefile not generated" > +} > + > +if {$core_generated} { > + clean_restart > + gdb_load ${binfile} > + with_test_prefix "native corefile" { > + check_poe_core_file $core_filename > + } > +} else { > + untested "native corefile not generated" > +} > diff --git a/gdb/testsuite/gdb.arch/aarch64-poe-sigsegv. b/gdb/testsuite/gdb.arch/aarch64-poe-sigsegv. > new file mode 100644 > index 00000000000..e69de29bb2d > diff --git a/gdb/testsuite/gdb.arch/aarch64-poe-sigsegv.c b/gdb/testsuite/gdb.arch/aarch64-poe-sigsegv.c > new file mode 100644 > index 00000000000..5346e51dbba > --- /dev/null > +++ b/gdb/testsuite/gdb.arch/aarch64-poe-sigsegv.c > @@ -0,0 +1,52 @@ > +/* This test program is part of GDB, the GNU debugger. > + > + Copyright 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 . */ > + > +/* Exercise AArch64's POE Extension. */ > + > +/* This test is based on the Linux kernel documentation for Memory > + Protection Keys, including the arm64 Permission Overlay Extension > + (FEAT_S1POE) support described in > + Documentation/core-api/protection-keys.rst. */ > + > +#define _GNU_SOURCE > +#include > +#include > + > +int > +main (void) > +{ > + long pagesize = sysconf (_SC_PAGESIZE); > + > + int *buf = mmap (NULL, pagesize, PROT_READ | PROT_WRITE, > + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); > + if (buf == MAP_FAILED) > + return 1; > + > + int pkey = pkey_alloc (0, 0); > + if (pkey == -1) > + return 1; > + > + if (pkey_mprotect (buf, pagesize, PROT_READ | PROT_WRITE, pkey) == -1) > + return 1; > + > + if (pkey_set (pkey, PKEY_DISABLE_WRITE) == -1) > + return 1; > + > + buf[0] = 42; /* Expect SIGSEGV POE violation. */ > + > + return 0; > +} > diff --git a/gdb/testsuite/gdb.arch/aarch64-poe-sigsegv.exp b/gdb/testsuite/gdb.arch/aarch64-poe-sigsegv.exp > new file mode 100644 > index 00000000000..19eafd14a2f > --- /dev/null > +++ b/gdb/testsuite/gdb.arch/aarch64-poe-sigsegv.exp > @@ -0,0 +1,58 @@ > +# Copyright (C) 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 . > + > +# Test a binary that supports FEAT_S1POE and exposes POR_EL0 register. > + > +global hex > +global decimal > + > +if {![allow_aarch64_poe_tests]} { > + unsupported "AArch64 POE not supported" > + return > +} Please use... require allow_aarch64_poe_tests ... instead. > + > +standard_testfile > +if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { > + return > +} > + > +if {![runto_main]} { > + return > +} > + > +# Display POE violation SIGSEGV error message. > +set poe_sigsegv_re [multi_line \ > + "Program received signal SIGSEGV, Segmentation fault" \ > + "Protection Key Violation while accessing address ${hex} with Protection Key = ${decimal}"] > + > +gdb_test_multiple "continue" "display POE violation information" { > + -re "$poe_sigsegv_re.*$gdb_prompt $" { > + pass $gdb_test_name > + } > + -re ".*exited with code 01.*$gdb_prompt $" { > + unsupported "POE userspace support unavailable" > + return > + } > +} > + > +# Fix the POE permissions (set $por_el0) and continue without delivering SIGSEGV. > +gdb_test_no_output "set \$por_el0 = 0x57" \ > + "allow write access by updating POR_EL0" > + > +gdb_test_multiple "signal 0" "continue after fixing POE fault" { > + -re ".*exited normally.*$gdb_prompt $" { > + pass $gdb_test_name > + } > +} > diff --git a/gdb/testsuite/gdb.arch/aarch64-poe.c b/gdb/testsuite/gdb.arch/aarch64-poe.c > new file mode 100644 > index 00000000000..2c95dc2a99b > --- /dev/null > +++ b/gdb/testsuite/gdb.arch/aarch64-poe.c > @@ -0,0 +1,29 @@ > +/* This test program is part of GDB, the GNU debugger. > + > + Copyright 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 . */ > + > +/* Exercise AArch64's POE Extension. */ > + > +/* This test is based on the Linux kernel documentation for Memory > + Protection Keys, including the arm64 Permission Overlay Extension > + (FEAT_S1POE) support described in > + Documentation/core-api/protection-keys.rst. */ > + > +int > +main (void) > +{ > + return 0; > +} > diff --git a/gdb/testsuite/gdb.arch/aarch64-poe.exp b/gdb/testsuite/gdb.arch/aarch64-poe.exp > new file mode 100644 > index 00000000000..5aea0350d81 > --- /dev/null > +++ b/gdb/testsuite/gdb.arch/aarch64-poe.exp > @@ -0,0 +1,46 @@ > +# Copyright (C) 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 . > + > +# Test a binary that uses POE and exposed POR_EL0 register. > + > +global hex > +global decimal > + > +if {![allow_aarch64_poe_tests]} { > + unsupported "AArch64 POE not supported" > + return > +} Please use... require allow_aarch64_poe_tests ... instead. > + > +standard_testfile > +if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { > + return > +} > + > +if {![runto_main]} { > + return > +} > + > +# Validate the presence of the POE register. > +gdb_test "info registers por_el0" \ > + "por_el0\[ \t\]+$hex.*" \ > + "info register por_el0 available" > + > +gdb_test "p \$por_el0" \ > + "\\$\[0-9\]+ = .*" \ > + "print por_el0 available" > + > +gdb_test "p/x \$por_el0" \ > + "\\$\[0-9\]+ = ${hex}" \ > + "print/x por_el0 available" > diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp > index a40c87c6727..ab573f50660 100644 > --- a/gdb/testsuite/lib/gdb.exp > +++ b/gdb/testsuite/lib/gdb.exp > @@ -5645,6 +5645,61 @@ gdb_caching_proc allow_aarch64_gcs_tests {} { > return $allow_gcs_tests > } > > +# Run a test on the target to see if it supports AArch64 POE extensions. > +# Return 1 if so, 0 if it does not. Note this causes a restart of GDB. > + > +gdb_caching_proc allow_aarch64_poe_tests {} { > + global srcdir subdir gdb_prompt inferior_exited_re > + > + set me "allow_aarch64_poe_tests" > + > + if {![is_aarch64_target]} { > + return 0 > + } > + > + # Compile a program that tests the POE feature. > + set src { > + #include > + #include > + > + /* Feature check for POE feature. */ > + #ifndef HWCAP2_POE > + #define HWCAP2_POE (1ULL << 63) > + #endif > + > + int main (void) { > + bool poe_supported = getauxval (AT_HWCAP2) & HWCAP2_POE; > + > + /* Return success if POE is supported. */ > + return !poe_supported; > + } > + } > + > + if {![gdb_simple_compile $me $src executable]} { > + return 0 > + } > + > + # Compilation succeeded so now run it via gdb. > + set allow_poe_tests 0 > + clean_restart > + gdb_load $obj > + gdb_run_cmd > + gdb_expect { > + -re ".*$inferior_exited_re normally.*${gdb_prompt} $" { > + verbose -log "\n$me: poe support detected" > + set allow_poe_tests 1 > + } > + -re ".*$inferior_exited_re with code 01.*${gdb_prompt} $" { > + verbose -log "\n$me: poe support not detected" > + } > + } > + gdb_exit > + > + remote_file build delete $obj > + verbose "$me: returning $allow_poe_tests" 2 > + return $allow_poe_tests > +} > + > # A helper that compiles a test case to see if __int128 is supported. > proc gdb_int128_helper {lang} { > return [gdb_can_simple_compile "i128-for-$lang" { Are we missing a signal frame test?