From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id w/xkIXUSamriTDMAWB0awg (envelope-from ) for ; Wed, 29 Jul 2026 10:47:17 -0400 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=W8gtEGLR; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=73vfbR2d; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=GT5fnL7Z; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=fn0enSCx; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 660941E09E; Wed, 29 Jul 2026 10:47:17 -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,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 41B4C1E099 for ; Wed, 29 Jul 2026 10:47:15 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8B6D64BB58E8 for ; Wed, 29 Jul 2026 14:47:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B6D64BB58E8 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=W8gtEGLR; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=73vfbR2d; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=GT5fnL7Z; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=fn0enSCx Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by sourceware.org (Postfix) with ESMTPS id 3B9D14BB58E4 for ; Wed, 29 Jul 2026 14:46:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3B9D14BB58E4 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 3B9D14BB58E4 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1785336407; cv=none; b=NV047zgxrNXC4YoV1ox5wQRU3VfNZ31oK95Zb1UIZ05QKUcV7I6wZJ0IgdD+DsVXc3q1ShpP8SuQDWULpaWEzIFCIig2gc1dsEaH8ZCBl7SAsAczoVcnLsSNAUo4pxomRI1SidcA/KsfjvJURdByjmQpYdyXsZffukM4jyxu6fM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1785336407; c=relaxed/simple; bh=oIg7xvUkWB1nOT2P6IT1AeRUfYsARNtdiSrGelZRXrw=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-ID:MIME-Version; b=O+uXNyZXnHuDN3APnvX7IgI8U0C9N08uz7nDoIrO80WwT+bs5//W38mE0BmpThVfHQ7Zbm1Dfz2H27uDQR6pv6ilWcIb9QzkzdflXCBrSNv/fa7B8RpJB54XCmnxeOSwgaEemdCoV11vr5sQhT9mFCLC/7hSia11x/ZpMAGznXc= ARC-Authentication-Results: i=1; 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=W8gtEGLR; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=73vfbR2d; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=GT5fnL7Z; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=fn0enSCx DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3B9D14BB58E4 Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104: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 23A507B879 for ; Wed, 29 Jul 2026 14:46:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1785336402; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=FJ/O6Gyu7bpaQBMjfKaSA1xYrpc2BWrz3J5HYBUKXZA=; b=W8gtEGLRd0P3Y9X3q/peSR3okLMVkCYiWodjMWykcQN4ONjSgfqFGAPsGE2LH0o76Yu3SL Aq5T6gqtROJ2FDVYuARtKx+WpLrWcOFMzxDlihAqEGkM9XGgRwlUV2m6gtKjGs9WNpU4sA Om0nMU5z1K0r5TDrZVyixfpe1D/d2NU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1785336402; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=FJ/O6Gyu7bpaQBMjfKaSA1xYrpc2BWrz3J5HYBUKXZA=; b=73vfbR2dDaZObz3xCKSb676gK6L2DfhnFH94R0Q/yucJe1EKq0Hbcmexprofhv7Q81U4Nu F3f6sGwGbzIPqwAA== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=GT5fnL7Z; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=fn0enSCx DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1785336398; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=FJ/O6Gyu7bpaQBMjfKaSA1xYrpc2BWrz3J5HYBUKXZA=; b=GT5fnL7Z/MPed2esNh+xd4W169EMuV2an+GB5P4O7gF80STmiCIqX91OZtxs1clMnGpswM mXDTiFJiO+a5ANYh5kwVTjMFkTFlb+/zA9QJ2JCrGM95NnzsxXX4gX+jeVD++k0/YbJVle /SDaMf3p2I0TZBPPGg7bji+8UDV2Qlg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1785336398; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=FJ/O6Gyu7bpaQBMjfKaSA1xYrpc2BWrz3J5HYBUKXZA=; b=fn0enSCxDdePdQousheTumxlE12/1EAs9/j2F+auujJZg9SKmOEUN57iYtgW/BhEOxIzir 95Yoe7Wcs1SuIgDQ== 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 102C8779B1 for ; Wed, 29 Jul 2026 14:46: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 b6O9Ak4SamqRSAAAD6G6ig (envelope-from ) for ; Wed, 29 Jul 2026 14:46:38 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH] [gdb/testsuite] Add xfail for failure to break on ppc printf Date: Wed, 29 Jul 2026 16:46:37 +0200 Message-ID: <20260729144637.3123620-1-tdevries@suse.de> X-Mailer: git-send-email 2.51.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Action: no action X-Rspamd-Queue-Id: 23A507B879 X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; URIBL_BLOCKED(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:mid,suse.de:dkim]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.de:+]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_TLS_ALL(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; DNSWL_BLOCKED(0.00)[2a07:de40:b281:106:10:150:64:167:received]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo, imap1.dmz-prg2.suse.org:rdns, suse.de:mid, suse.de:dkim] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org 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 With test-case gdb.server/sysroot.exp, we run into: ... (gdb) break printf^M Breakpoint 2 at 0x7ffff7c2045c^M (gdb) continue^M Continuing.^M [Inferior 1 (process 469972) exited normally]^M (gdb) FAIL: $exp: sysroot=local: continue to printf (the program exited) ... The problem is that while breakpoint is indeed set on printf: ... (gdb) b printf Breakpoint 2 at 0x7ffff7c2045c (gdb) disassemble 0x7ffff7c2045c Dump of assembler code for function printf@@GLIBC_2.17: ... the function that is called instead is __printfieee128. Glibc commit f05ab7c4a9 ("ldbl-128ibm-compat: Add local aliases for printf family symbols") should fix this, but that's available starting version 2.43. Add an xfail for older glibc (without backport of that patch). Tested on ppc64le-linux and x86_64-linux. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29989 --- gdb/testsuite/gdb.base/annota1.exp | 20 +++++++++++++ gdb/testsuite/gdb.base/annota3.exp | 44 +++++++++++++++++++++------- gdb/testsuite/gdb.server/sysroot.exp | 20 +++++++++++-- 3 files changed, 72 insertions(+), 12 deletions(-) diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp index 35eaf26103e..ca3365500c0 100644 --- a/gdb/testsuite/gdb.base/annota1.exp +++ b/gdb/testsuite/gdb.base/annota1.exp @@ -262,13 +262,33 @@ set pat_begin "\r\n\032\032post-prompt\r\nContinuing.\r\n\r\n\032\032starting\r\ set pat_adjust "warning: Breakpoint 3 address previously adjusted from $hex to $hex.\r\n" set pat_end "\r\n\032\032breakpoint 3\r\n\r\nBreakpoint 3(\\.$decimal)?, \r\n\032\032frame-begin 0 $hex\r\n\r\n(\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n)*.*\032\032frame-function-name\r\n.*printf(@.*)?\r\n\032\032frame-args\r\n.*\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" +set unsupported 0 gdb_test_multiple "continue" "continue to printf" { -re "${pat_begin}($pat_adjust)?$pat_end" { pass $gdb_test_name } + -re $inferior_exited_re.*\r\n$gdb_prompt$ { + if {[istarget "powerpc64*-linux*"]} { + # On ppc64, glibc without commit f05ab7c4a9 + # ("ldbl-128ibm-compat: Add local aliases for printf + # family symbols") may have two printf breakpoint + # locations, but export only one of them. Consequently, + # gdb sets a breakpoint on only one location, and there's + # no guarantee that the breakpoint will trigger. + xfail "$gdb_test_name (the program exited)" + } else { + fail "$gdb_test_name (the program exited)" + } + set unsupported 1 + } -re ".*$gdb_prompt$" { fail $gdb_test_name } } +if {$unsupported} { + unsupported "inferior exited" + return +} + set pac [string_to_regexp {[PAC]}] # diff --git a/gdb/testsuite/gdb.base/annota3.exp b/gdb/testsuite/gdb.base/annota3.exp index 8a69350f1d5..f8b65d776f6 100644 --- a/gdb/testsuite/gdb.base/annota3.exp +++ b/gdb/testsuite/gdb.base/annota3.exp @@ -163,16 +163,40 @@ gdb_test -prompt "$gdb_prompt$" "break printf" \ # # get to printf # -send_gdb "continue\n" -gdb_expect_list "continue to printf" "$gdb_prompt$" [subst_vars { - "\r\n\032\032post-prompt\r\n" - "Continuing.\r\n" - "\r\n\032\032starting\r\n" - "\r\n\032\032breakpoint 3\r\n" - "\r\n" - "Breakpoint 3(\\.$decimal)?, \[^\r\n\]*\r\n" - "\r\n\032\032stopped\r\n" -}] +set re_pass \ + [string cat \ + "\r\n\032\032post-prompt\r\n" \ + "Continuing.\r\n" \ + "\r\n\032\032starting\r\n" \ + "\r\n\032\032breakpoint 3\r\n" \ + "\r\n" \ + [subst_vars {Breakpoint 3(\.$decimal)?, [^\r\n]*\r\n}] \ + ".*" \ + "\r\n\032\032stopped"] +set unsupported 0 +gdb_test_multiple "continue" "continue to printf" -prompt "$gdb_prompt$" { + -re -wrap $re_pass { + pass $gdb_test_name + } + -re -wrap $inferior_exited_re.* { + if {[istarget "powerpc64*-linux*"]} { + # On ppc64, glibc without commit f05ab7c4a9 + # ("ldbl-128ibm-compat: Add local aliases for printf + # family symbols") may have two printf breakpoint + # locations, but export only one of them. Consequently, + # gdb sets a breakpoint on only one location, and there's + # no guarantee that the breakpoint will trigger. + xfail "$gdb_test_name (the program exited)" + } else { + fail "$gdb_test_name (the program exited)" + } + set unsupported 1 + } +} +if {$unsupported} { + unsupported "inferior exited" + return +} send_gdb "backtrace\n" gdb_expect_list "backtrace from shlibrary" "$gdb_prompt$" { diff --git a/gdb/testsuite/gdb.server/sysroot.exp b/gdb/testsuite/gdb.server/sysroot.exp index 7e4a796e879..6a5d0b7c418 100644 --- a/gdb/testsuite/gdb.server/sysroot.exp +++ b/gdb/testsuite/gdb.server/sysroot.exp @@ -88,7 +88,23 @@ foreach_with_prefix sysroot $modes { # Test that we can stop inside a library. gdb_breakpoint printf - gdb_test "continue" "Breakpoint $decimal.* (__|___ieee128_)?printf.*" \ - "continue to printf" + gdb_test_multiple "continue" "continue to printf" { + -re -wrap "Breakpoint $decimal.* (__|___ieee128_)?printf.*" { + pass $gdb_test_name + } + -re -wrap $inferior_exited_re\[^\r\n\]+ { + if {[istarget "powerpc64*-linux*"]} { + # On ppc64, glibc without commit f05ab7c4a9 + # ("ldbl-128ibm-compat: Add local aliases for printf + # family symbols") may have two printf breakpoint + # locations, but export only one of them. Consequently, + # gdb sets a breakpoint on only one location, and there's + # no guarantee that the breakpoint will trigger. + xfail "$gdb_test_name (the program exited)" + } else { + fail "$gdb_test_name (the program exited)" + } + } + } } } base-commit: 36af47b3a8348b9ff9c717100c44049c6f3d6315 -- 2.51.0