From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id bmRUEKMn32nUZxgAWB0awg (envelope-from ) for ; Wed, 15 Apr 2026 01:52:35 -0400 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=iY0DTaQs; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 2394C1E0C3; Wed, 15 Apr 2026 01:52:35 -0400 (EDT) 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 vm01.sourceware.org (vm01.sourceware.org [38.145.34.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 ED1171E0B1 for ; Wed, 15 Apr 2026 01:52:33 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 161A04BA2E14 for ; Wed, 15 Apr 2026 05:52:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 161A04BA2E14 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=iY0DTaQs Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id CCE944BA2E06 for ; Wed, 15 Apr 2026 05:52:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CCE944BA2E06 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 CCE944BA2E06 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=1776232329; cv=none; b=TQdE6aFABL69/Jqr8Q+ZubvUnGlrYWa9xPfea362FFtqyeOOOU0kLuo6KTBJjFq8Am9K3O+EUfIsUR/YxSGpffY7APvvayTotxP9bzwyiskpx1WohKisaG7jvPAZFVB8itLIU9uQu/ZMkj8rMC1fJP1trTOb/7RGDfVIPiz2WHA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776232329; c=relaxed/simple; bh=wYmvya57ArFzeQnsdVSTiiujrng7wXTfnVfY1jPsOF8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=pREkVQsKoETV7af8bE2vYvlTUWHEGep+XwbKn6qo6QQctcCL8pETi6CIOs47skq6Cqdh3b2MfeYVOdKzxwuMqqBaKPTMyXZZ/D76ONuJ4Z/rcPv4yxRVyf1AFkWHQhWsuwIBlMdr888buM/EGYxthtCS/evcdyVdpdU5IwNCXOk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CCE944BA2E06 Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63ELOqPp1859859; Wed, 15 Apr 2026 05:52:04 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=vGAgK/NlBLMRN0USvC3CWHdONl6kw+P3x11ErqiDj pU=; b=iY0DTaQsixTowR53lQiTOLc3CCM+JWlerKZ1Zw2LUxV1UNBDVND1ZcWGy 7Bm5HvYI6/ihmCoKzePxCp6b4yr5XKR18XNxxzfrjUIdHpHdmgQzwBm17d5WWZXq hjEuMN34T7z9weu34WD6PTFKxwZ1HHaDH12ALQrYy1tq44igbEhl5TW87yvnRQHl JEbHeWfkr6VN+RVBzSjx55/4p+wtpQ6ZKcDw8AGzEc1lD11a3NQuSXXs81v7XWdV L8YCvCz2KrhqS+A62xys8Rp91z8DOiEMzHMngR8sMfzW5sV5QXmIkY7PlH2sl7WP gOThqTWLVntilSUy8B2js0mWsltjA== Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4dh89pe5be-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Apr 2026 05:52:04 +0000 (GMT) Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 63F26O6o015149; Wed, 15 Apr 2026 05:52:03 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 4dg0msn1f6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 15 Apr 2026 05:52:03 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 63F5pvLQ40304976 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Apr 2026 05:51:57 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B825B20043; Wed, 15 Apr 2026 05:51:57 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E8CD320040; Wed, 15 Apr 2026 05:51:56 +0000 (GMT) Received: from kubota.pok.stglabs.ibm.com (unknown [9.114.39.181]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 15 Apr 2026 05:51:56 +0000 (GMT) From: Abhay Kandpal To: gdb-patches@sourceware.org Cc: aburgess@redhat.com, Ulrich.Weigand@de.ibm.com, cel@linux.ibm.com, abhay.k@ibm.com, Abhay Kandpal Subject: [PATCH v1] gdb/testsuite: Fix skip-tree.exp for PowerPC post-call NOP Date: Wed, 15 Apr 2026 00:51:44 -0500 Message-ID: <20260415055144.2729164-1-abhay@linux.ibm.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 8sot6iGYI8ySjcocL22JKeLRvd8kHA84 X-Proofpoint-ORIG-GUID: 8sot6iGYI8ySjcocL22JKeLRvd8kHA84 X-Authority-Analysis: v=2.4 cv=WbE8rUhX c=1 sm=1 tr=0 ts=69df2784 cx=c_pps a=bLidbwmWQ0KltjZqbj+ezA==:117 a=bLidbwmWQ0KltjZqbj+ezA==:17 a=A5OVakUREuEA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=Y2IxJ9c9Rs8Kov3niI8_:22 a=YxLy0kg5tyGT9WXVFcAA:9 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDE1MDA1MSBTYWx0ZWRfX78qXccz4ccbx GF/C+gKLGiF32ety9PdDUSqR/aDtKvpsuKRUy/tUtiGfR87iHraoiodzPu4HoZ4ytLHhlnYI56L 5AZ9lo6K+/Um7mKLa59wnvEcmWegjpREb1CYc8J7QJRbPmjBMFlXU4GIVXZb/+O3B5FfFtkg0kI meHWPoXU+lckP5NxJ+sDVlzPWh2prXn/lFQQA/8qlY9ZmD+BgZDeC0mNnSDPulGd6TgKpG30EYi cfkuQp3VTVwYRd7+6DlwDOJ6oi6ucRQDpDzLxd7KBYTybt6ZmA/2tE3mYY56LAy3sk6T9ftslAE 9cR/ta4RjfiUcazqdqzUpBeZKMM4VQ1NWknrx8+IarmllGSZSE2ZUPdS9MKC7TDgR4dY3ihesEA Ye/Z6h7+q4GtkVzruFI975Z+OhcZDxBNfvpohcj6PptWa3G4F79azqNJhQxHgFUzygsdqsANOSL Puvf/nMJa7/fJQ6KTew== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-14_04,2026-04-13_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 bulkscore=0 priorityscore=1501 spamscore=0 clxscore=1015 phishscore=0 impostorscore=0 adultscore=0 malwarescore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604070000 definitions=main-2604150051 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 The skip-tree.exp test was recently added in commit 5ed98c177f9a and fails on PowerPC due to architectural differences in function return handling. On PowerPC64 ELFv2, calls to external functions are followed by a `nop` instruction that serves as a placeholder for TOC pointer restoration. Since this `nop` typically has no DWARF line entry, `finish` reports the call line instead of the next line. This patch adds a PowerPC-specific `next` command after `finish` in skip-tree.exp to advance to the expected source line. This handles the architectural difference without changing GDB's core behavior. Tested on ppc64le, x86_64-linux. gdb/testsuite/ * gdb.base/skip-tree.exp (run_test): Add PowerPC-specific handling after `finish` command by issuing an extra `next`. --- This patch is reg tested. gdb/testsuite/gdb.base/skip-tree.exp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/skip-tree.exp b/gdb/testsuite/gdb.base/skip-tree.exp index dc93c4cef84..c2504e75979 100644 --- a/gdb/testsuite/gdb.base/skip-tree.exp +++ b/gdb/testsuite/gdb.base/skip-tree.exp @@ -140,8 +140,18 @@ proc run_test { file_glob skip_func1 skip_func2 skip_func3 skip_func4 \ "step into func$i" # Now finish the function, returning to the caller. - gdb_test "finish" ".*" \ - "finish from func$i" + if { [istarget "powerpc*-*-*"] } { + # On PowerPC, finish may land on call line due to post-call NOP + # that lacks a DWARF line entry. We need an extra 'next' to reach + # the next statement. + gdb_test "finish" ".*" \ + "finish from func$i" + gdb_test "next" ".*" \ + "next after finish from func$i" + } else { + gdb_test "finish" ".*" \ + "finish from func$i" + } } else { # After skipping the function, on which line should we # stop, and what does the line look like. -- 2.47.3