From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ejsgCV1SJWlvUSwAWB0awg (envelope-from ) for ; Tue, 25 Nov 2025 01:53:17 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=inTNIxwP; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id EDF0C1E0B3; Tue, 25 Nov 2025 01:53:16 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 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 3CBE11E08D for ; Tue, 25 Nov 2025 01:53:14 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 686BA385801D for ; Tue, 25 Nov 2025 06:53:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 686BA385801D Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=inTNIxwP Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 2DEE638582AB for ; Tue, 25 Nov 2025 06:50:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2DEE638582AB Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2DEE638582AB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1764053452; cv=none; b=R7+JYUlFbSQPYgO35Noki9OOM1w1J756bNggBvgS7+AgSu8oiMEC3E9GXZj3pru8Y4wHRD1npzF1OL6Fq9HKEbhHUr6Haed7i7YmIJYxpU7YhuZ0DCSWt9z8ikCPEhSrb+L4khXn5kGZosLUole1fJISkIKsXoEWL8QxjQQ/Syw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1764053452; c=relaxed/simple; bh=2GWJ0p51O7Xu710jek/EJu/RYkUbnQCqyBp3tx3Fk6g=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=f0zrd0CKlFVCfm8NKPT7rZbfGcBzrKMK/eHo0vZm1x05j7/H+nHc8imEZ3kqb0VYZSw7Edp3RGpvchjtuT8ZeODymSrw1wlm3rqW16jUFt9WCNW+s3mu0t5cYhH3yzHE6brI6E7flf5P5sL9/wBw69Sw7rEKXA1NQYpKze0jEjY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2DEE638582AB Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5AOMeIhn002155; Tue, 25 Nov 2025 06:50:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=pp1; bh=kVI03CiJu1lyg/9UoVKI7huBvTiP5FbBtpL51irit ME=; b=inTNIxwPjrEJDTHMfE1nZ5i+3Lz3LGoBRDje7a8UfChRBYCsg3ogm4Pg4 PaSwFVU6EBQAaxtyBF+eDGM5t1RtuzX8YedMekArbPQHJdZWzXQ3tl4XR3nJYR1X 9kKA354Uc2WbIcvQR3JpA+HfM/6Ri+OEFfXgDj+aWLOHqDbcMPqz0QQXWkXIb0Rk OJLUvRgZXuNQNG2Tlt3LH/iVneaDqhnNJ81lOKXJ3gESyG4B67XpGze2R6OkSemf F5bsaLBQSR9YRUaEgGwMhciYkIPcey3OtX2Koa8TxB/xtgtJMlWzufMh5swG3qUr hJ3SoohmmgkkoBNI2YYZenc4qnR7Q== Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4ak4u1u9kk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 25 Nov 2025 06:50:51 +0000 (GMT) Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 5AP6Igpp016406; Tue, 25 Nov 2025 06:50:50 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4aks0k22ed-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 25 Nov 2025 06:50:50 +0000 Received: from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com [10.20.54.100]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 5AP6ohXK58327494 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Nov 2025 06:50:43 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A74F320043; Tue, 25 Nov 2025 06:50:43 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6E85720040; Tue, 25 Nov 2025 06:50:42 +0000 (GMT) Received: from ltcd97-lp3.rch.stglabs.ibm.com (unknown [9.5.12.117]) by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 25 Nov 2025 06:50:42 +0000 (GMT) From: Abhay Kandpal To: gdb-patches@sourceware.org Cc: Ulrich.Weigand@de.ibm.com, tdevries@suse.de, cel@linux.ibm.com, abhay.k@ibm.com, Abhay Kandpal Subject: [PATCH v2] PowerPC: Skip base type RTTI tests before inferior start Date: Tue, 25 Nov 2025 00:50:19 -0600 Message-ID: <20251125065019.2316402-1-abhay@linux.ibm.com> X-Mailer: git-send-email 2.51.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTIyMDAyMSBTYWx0ZWRfX/4HPzlkZOlep sEGwzmN658gd4ZDXLmzUmDQeYjVjPdv4sGjF1KvExXjFyD/O7sCuKKOoZevZbNLRSWU33mgGynV XZ+f94xsRoISdGwEIxEediAZagVBfXAT+ms0uMUc1DF8X16elQGsBghCSCMBupKbVOhKK2nJSJ1 fRAAJc7lTg2E1O+RUE2Z18FlcWHr4yZ6oYPR5maEY4Wa0gMqEPrAzm4q1N+ZCV6Sxx+wdCgdFBw hKFRGOcd2d4cdGC5UfuHqhdoIn72fSNrOXrz8ycKcxFm52PJHEuqJjDKalUY+DrRMFce1lXQo/s PwAeFSQg5j44mfwOZx0VJsDMEV7Mfn38OLTxDJCZGNDJGrMLPF6pof+z/q+O8RtPUdJ38Sk6WD5 zVAANCdi5WEAiTDyYDToiiXKGAXzgA== X-Authority-Analysis: v=2.4 cv=SuidKfO0 c=1 sm=1 tr=0 ts=692551cb cx=c_pps a=3Bg1Hr4SwmMryq2xdFQyZA==:117 a=3Bg1Hr4SwmMryq2xdFQyZA==:17 a=6UeiqGixMTsA:10 a=VkNPw1HP01LnGYTKEx00:22 a=t1p67SpEoJLMWSv0XGcA:9 X-Proofpoint-ORIG-GUID: Z8IF_MjXf_kUa4o86z7pN7X4_lcbD14o X-Proofpoint-GUID: Z8IF_MjXf_kUa4o86z7pN7X4_lcbD14o X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-25_01,2025-11-24_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 clxscore=1011 impostorscore=0 malwarescore=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2510240000 definitions=main-2511220021 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 PowerPC targets, RTTI typeinfo objects for simple base types such as `int`, `char*`, and `const char*` may not be emitted until the inferior has been started. As a result, the `gdb.cp/typeid.exp` test fails when checking typeid results before program execution begins. This patch extends the existing Clang-specific logic that skips base type RTTI checks before the inferior starts, to also apply on PowerPC. This ensures consistent test behavior across compilers and targets. gdb/testsuite/ * gdb.cp/typeid.exp (do_typeid_tests): Skip base type RTTI tests before inferior start on PowerPC. --- This patch is reg tested. Change from v1 -> v2 gdb/testsuite/gdb.cp/typeid.exp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/gdb/testsuite/gdb.cp/typeid.exp b/gdb/testsuite/gdb.cp/typeid.exp index bd97b26c6e4..cce6a294dd5 100644 --- a/gdb/testsuite/gdb.cp/typeid.exp +++ b/gdb/testsuite/gdb.cp/typeid.exp @@ -28,14 +28,24 @@ proc do_typeid_tests {started} { set type_re "(std::type_info|gdb_gnu_v3_type_info)" set var {ca b} - if {$started || ![test_compiler_info clang-*-* c++]} { - # Clang doesn't place type information for the base types in - # the executable, and relies on this being linked in from the - # standard library. As a result, type information for these - # variables is only available once the inferior is started. + set have_base_types 1 + if {!$started} { + if {[test_compiler_info clang-*-* c++]} { + # Note that we test pointer equality rather than object + # Clang doesn't place type information for the base types in + # the executable, and relies on this being linked in from the + # standard library. As a result, type information for these + # variables is only available once the inferior is started. + set have_base_types 0 + } elseif {[istarget "powerpc*-*-*"]} { + # On PowerPC, RTTI typeinfo for base types (i, cp, ccp) may not be + # emitted until the inferior is started. + set have_base_types 0 + } + } + if { $have_base_types } { lappend var i cp ccp } - foreach simple_var $var { gdb_test "print &typeid($simple_var)" \ " = \\($type_re \\*\\) $hex.*" -- 2.51.1