From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ISywAotrJWnJuywAWB0awg (envelope-from ) for ; Tue, 25 Nov 2025 03:40:43 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=c5LKCfO4; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=DBd2Pp9u; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=c5LKCfO4; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=DBd2Pp9u; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id F01151E08D; Tue, 25 Nov 2025 03:40:42 -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.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,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 C033B1E08D for ; Tue, 25 Nov 2025 03:40:41 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 51915385843F for ; Tue, 25 Nov 2025 08:40:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 51915385843F Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=c5LKCfO4; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=DBd2Pp9u; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=c5LKCfO4; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=DBd2Pp9u Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by sourceware.org (Postfix) with ESMTPS id 86EE8385843F for ; Tue, 25 Nov 2025 08:39:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 86EE8385843F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 86EE8385843F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1764059979; cv=none; b=IBETmIXXh/O3+u5xpWH0Oa9Qfy4HfBO+oXEQ+78y0HlFvHzEXSOzWb1SHMkEcVoCDekwP2On0/jhuF18OXyTS5epIp0XAjF0ulgVzz8eGNheaSdOjXudrw6hViBXsek71svJd5AdZWpz/yeO30HABSRZksDlViHuUnDU6JBunjM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1764059979; c=relaxed/simple; bh=uwcfYolXH8hzWMohRozNvrwl06IZjmp4Y33kA1J43jo=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:To:From; b=gmGsOAqIR6EbTBt4Ks6x5vo721rM8ZMoEnhEMf0d+s4VYR3tioadnh9OJAS2A5b+qtroyeWMMdYOWIxK2FHHKaFF7Rf1SQagssrby0WbSUKiKHdyaZEuiZ3cYO3JEzkykQYpWAytqQ4ACirzxcE9b3f1KJCFeY/FZOFM8u7ELBM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 86EE8385843F Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 4B57A22710; Tue, 25 Nov 2025 08:39:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1764059978; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yApfw0f6QOtIqUGZML4ZQ17RyuBc8sqURk5fiIhZAXU=; b=c5LKCfO4TV+Aq56ZhZE1dwXVGx+byYoJvBQOBBWqKNPmXraOnOC1PyuFTOXfugIl3Ku/C9 2+vWS4WFMbCMuIBHhNBTgpeGiG3JwawqCicJ1lID1iOQTfmaA9DkcEEJicbFAbsNpbTF94 H/84UUTQte3SuMJE6Dq3GMUHMk9ax2U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1764059978; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yApfw0f6QOtIqUGZML4ZQ17RyuBc8sqURk5fiIhZAXU=; b=DBd2Pp9ugAChA8TOY2MVvh2zjH7C0gKXFfEkBbTZA4gNrg/rFpsOsMDr1uH03I+vFxh2gq EtFDEjLOzIv/FsBA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1764059978; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yApfw0f6QOtIqUGZML4ZQ17RyuBc8sqURk5fiIhZAXU=; b=c5LKCfO4TV+Aq56ZhZE1dwXVGx+byYoJvBQOBBWqKNPmXraOnOC1PyuFTOXfugIl3Ku/C9 2+vWS4WFMbCMuIBHhNBTgpeGiG3JwawqCicJ1lID1iOQTfmaA9DkcEEJicbFAbsNpbTF94 H/84UUTQte3SuMJE6Dq3GMUHMk9ax2U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1764059978; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yApfw0f6QOtIqUGZML4ZQ17RyuBc8sqURk5fiIhZAXU=; b=DBd2Pp9ugAChA8TOY2MVvh2zjH7C0gKXFfEkBbTZA4gNrg/rFpsOsMDr1uH03I+vFxh2gq EtFDEjLOzIv/FsBA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 248493EA63; Tue, 25 Nov 2025 08:39:38 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 2kWcB0prJWnSEgAAD6G6ig (envelope-from ); Tue, 25 Nov 2025 08:39:38 +0000 Message-ID: <77a934e1-948d-4174-a9d9-83393f1f2141@suse.de> Date: Tue, 25 Nov 2025 09:39:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] PowerPC: Skip base type RTTI tests before inferior start To: Abhay Kandpal , gdb-patches@sourceware.org Cc: Ulrich.Weigand@de.ibm.com, cel@linux.ibm.com, abhay.k@ibm.com References: <20251125065019.2316402-1-abhay@linux.ibm.com> Content-Language: en-US From: Tom de Vries In-Reply-To: <20251125065019.2316402-1-abhay@linux.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-4.30 / 50.00]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email, suse.de:mid, imap1.dmz-prg2.suse.org:helo] 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 11/25/25 7:50 AM, Abhay Kandpal wrote: > 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. > LGTM, with one nit below. Approved-By: Tom de Vries Thanks, - Tom > 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 > } > - Don't remove this empty line. > foreach simple_var $var { > gdb_test "print &typeid($simple_var)" \ > " = \\($type_re \\*\\) $hex.*"