From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id nropDJZLgGrXbSgAWB0awg (envelope-from ) for ; Sat, 15 Aug 2026 07:20:54 -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=lffNm3h1; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=WTx7aF2b; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=DUjI1WIq; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=NC0d+EgN; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 2093B1E0A3; Sat, 15 Aug 2026 07:20:54 -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 [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 3CD921E033 for ; Sat, 15 Aug 2026 07:20:53 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6F46B4BA23DC for ; Sat, 15 Aug 2026 11:20:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6F46B4BA23DC 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=lffNm3h1; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=WTx7aF2b; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=DUjI1WIq; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=NC0d+EgN Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by sourceware.org (Postfix) with ESMTPS id 9F3F84BA2E32 for ; Sat, 15 Aug 2026 11:20:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9F3F84BA2E32 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 9F3F84BA2E32 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786792825; cv=none; b=UnUg4JM61vTHm5BxkWhkSU2zqIDLZs9D3RGON2Qq5V5KC3kekIIy3WOO3On9K9k+wyC5CCU7nTdyTnv5bYrSnF6pL4Ep3XZR9kg0bZNCGBwlOXBqHX/Zrad/6o7o1WVn3qjkt/syrxhN8ge3zRDCpmH0DYomfKvEb/F3W356sJ4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786792825; c=relaxed/simple; bh=psfVOq4gzDjv+A+aUU1Ws9MAKtU1CLFp320eJkI7NKM=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:From:To; b=tqUnpisS0RFYObtzufAS/40GsZmpLhlZt3YXGSNi7aE50eVOLDhlRt++0MIGhRoWDAGc+7+U0//9WlQ/04cLGdO1goPA1UMHX3Kem0sWp/6Ldkf39IDSHAMWHRHsACa1n2zqfDRa/Dk+EigWhN22HssQI/4LZ6/rSspRKZrfgiw= 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=lffNm3h1; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=WTx7aF2b; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=DUjI1WIq; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=NC0d+EgN DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9F3F84BA2E32 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-out2.suse.de (Postfix) with ESMTPS id 4ED703DFE for ; Sat, 15 Aug 2026 11:20:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1786792820; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WaEcZ/7bl6znWxLtQcMJOfFi0KFBdxC7wcnLaJSzV2k=; b=lffNm3h1YMRGrbkBxTHLWqQjFhvDsE/FR22VbfMcgvJifKGJyj9SrCH7rLnfi+BXpwqegD hty0lTcrv9s4k8K1pmFMvubvk5iIVMcouT+amSszdsyzE1fkqcpBVb0+PQcJvrUIRAuExk sWdkpr5y0DkmajGerbvuZfwmUHYImT4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1786792820; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WaEcZ/7bl6znWxLtQcMJOfFi0KFBdxC7wcnLaJSzV2k=; b=WTx7aF2bumKIqLMskuEa0zfB/qFuLceXMvTeasl9Tq2Ml6TkOT9veCaHoaEWMdtUIGvQLR LmGOS1UZgg5WS9Cg== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1786792816; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WaEcZ/7bl6znWxLtQcMJOfFi0KFBdxC7wcnLaJSzV2k=; b=DUjI1WIqdTJONxT5Xiq0acK9wlafQmqYWDZc61SfYsEIMxQX8ucnonJ6wQWTuEB23mXEnn 1+Wwy2gvhSD0f6g+D8eM513XwcXxzkHoOvPaJ+mORHyUwP4LT679GzIYDCD/KaLDZOdomk 07gpvrlTJHlfmtpkU8UbLGzqS6P7PQg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1786792816; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WaEcZ/7bl6znWxLtQcMJOfFi0KFBdxC7wcnLaJSzV2k=; b=NC0d+EgNvkIYUgV8UnRaqoKOrCzJvPk30PJ78Dwx0pMxnLmHcxZ6f13RerE9/fiDDTIxnB 7H6QULH/RqoN54DQ== 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 3607C788F2 for ; Sat, 15 Aug 2026 11:20:16 +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 zZYRC3BLgGp9fwAAD6G6ig (envelope-from ) for ; Sat, 15 Aug 2026 11:20:16 +0000 Message-ID: Date: Sat, 15 Aug 2026 13:20:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] [gdb/testsuite] Add xfail for failure to break on ppc printf From: Tom de Vries To: gdb-patches@sourceware.org References: <20260729144637.3123620-1-tdevries@suse.de> Content-Language: en-US In-Reply-To: <20260729144637.3123620-1-tdevries@suse.de> 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)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; 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]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[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 7/29/26 4:46 PM, Tom de Vries wrote: > 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). > I had claude code review this. It pointed that that the unsupported message "inferior exited" was somewhat vague, so I changed that into "printf breakpoint didn't trigger". I also noticed that in gdb.server/sysroot.exp the changes were done in a loop, so I should also add an if unsupported clause there. Pushed with those changes. Thanks, - Tom > 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