From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 5DD993858C62 for ; Mon, 28 Nov 2022 18:08:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5DD993858C62 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 8FC0421ADC; Mon, 28 Nov 2022 18:08:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1669658937; 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=JdRSlIM7APj/NKnqXTEQmFZpYvwtRzd8fNL0ab4dQpQ=; b=P+HU2qTYZBymNdvKGP6jPWAF4mflfYKLVp1MuhD4ZXgiPwNBtz4fchcqg7F5d8TICpxJyS WTWqRC3rY3yDBn2WirWmUawoTdckAfJX3XCmDgAqlk+z76ziUhCgE9BG4592llhVnuHEdU 9HUPLkBqiyRijdsGEHp7Ua2i056CiKI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1669658937; 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=JdRSlIM7APj/NKnqXTEQmFZpYvwtRzd8fNL0ab4dQpQ=; b=Atsjhpf5wFGJkRAwkgfMvdB1ZCylOXTv0A2+Idhyb6s6Dmh88Sp7dxugABThUFBQS6xOcu IT6bsTTldwt7woBA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 680D113273; Mon, 28 Nov 2022 18:08:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id xLQ1GDn5hGPwGgAAMHmgww (envelope-from ); Mon, 28 Nov 2022 18:08:57 +0000 Message-ID: Date: Mon, 28 Nov 2022 19:08:56 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [pushed] [gdb/testsuite] Fix gdb.ada/out_of_line_in_inlined.exp for ppc64le Content-Language: en-US To: Carl Love , gdb-patches@sourceware.org Cc: Ulrich Weigand , Tom Tromey References: <20221128162134.20424-1-tdevries@suse.de> From: Tom de Vries In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 11/28/22 18:45, Carl Love wrote: > Tom: > > > On Mon, 2022-11-28 at 17:21 +0100, Tom de Vries wrote: >> On powerpc64le-linux, with test-case >> gdb.ada/out_of_line_in_inlined.exp I run >> into: >> ... >> (gdb) run ^M >> Starting program: foo_o224_021-all ^M >> ^M >> Breakpoint 1, 0x0000000010002f48 in foo_o224_021.child1.child2 >> (s=...) at \ >> foo_o224_021.adb:24^M >> 24 function Child2 (S : String) return Boolean is -- >> STOP^M >> (gdb) FAIL: gdb.ada/out_of_line_in_inlined.exp: scenario=all: \ >> run to foo_o224_021.child1.child2 >> ... >> >> The breakpoint is correctly set at the local entry point, and given >> that the >> local entry point doesn't correspond to a line number entry, the >> instruction >> address of the breakpoint is shown. >> >> The problem is that test-case doesn't expect the breakpoint address. >> >> Fix this by allowing the breakpoint address to occur. >> >> Tested on powerpc64le-linux. >> --- >> gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp >> b/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp >> index 4bdb4decaaf..621b04e179b 100644 >> --- a/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp >> +++ b/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp >> @@ -34,7 +34,7 @@ foreach_with_prefix scenario {all minimal} { >> >> gdb_run_cmd >> gdb_test "" \ >> - "Breakpoint $decimal, foo_o224_021\\.child1\\.child2 >> \\(s=\\.\\.\\.\\).*" \ >> + "Breakpoint $decimal, ($hex in )?foo_o224_021\\.child1\\.child2 >> \\(s=\\.\\.\\.\\).*" \ >> "run to foo_o224_021.child1.child2" >> >> set opt_addr_in "($hex in)?" >> >> base-commit: 76cd77dc729b03d6b33c683323594479e33a3f9a > > The commit fixes the two test failures when run on my Power 9 box. The > test runs without any errors on Power 9 with the fix. > > However, with the commit to fix the test on Power 10, I see the > following failures: > > (gdb) run > Starting program: /home/carll/GDB/build-test/gdb/testsuite/outputs/gdb.ada/out_of_line_in_inlined/foo_o224_021-all > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib64/libthread_db.so.1". > > Breakpoint 1.1, foo_o224_021.child1.child2 (s=...) at /home/carll/GDB/binutils-gdb-test/gdb/testsuite/gdb.ada/out_of_line_\ > in_inlined/foo_o224_021.adb:27 > 27 Do_Nothing (C); > (gdb) FAIL: gdb.ada/out_of_line_in_inlined.exp: scenario=all: run to foo_o224_021.child1.child2 > > ... > > Breakpoint 1 at 0x10011870: foo_o224_021.child1.child2. (3 locations) > (gdb) run > Starting program: /home/carll/GDB/build-test/gdb/testsuite/outputs/gdb.ada/out_of_line_in_inlined/foo_o224_021-minimal > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib64/libthread_db.so.1". > > Breakpoint 1.1, foo_o224_021.child1.child2 (s=...) at /home/carll/GDB/binutils-gdb-test/gdb/testsuite/gdb.ada/out_of_line_\ > in_inlined/foo_o224_021.adb:27 > 27 Do_Nothing (C); > (gdb) FAIL: gdb.ada/out_of_line_in_inlined.exp: scenario=minimal: run to foo_o224_021.child1.child2 > > I backed the gdb tree up to the previous commit on Power 10 with the command: > > git checkout af31506c31a59a6edbb13498d6075fa704b801cd > > and re-ran the tests. I see the same two failures. These failures > appear to be different than the ones that Tom reported and fixed with > the commit. > > From discussion of previous test fixes, there may be a system > configuration difference here: > > My Power 10 system: Fedora release 36 (Thirty Six), gcc (GCC) 12.2.1 > 20220819 (Red Hat 12.2.1-2) > > Power 9 system: Ubuntu 20.04.5 LTS, gcc (Ubuntu 9.4.0- > 1ubuntu1~20.04.1) 9.4.0 > > From what Tom reported on another test, he is running on (openSUSE Leap > 15.4) has system gcc 7.5.0. > Hi Carl, thanks for looking into this. AFAICT, the FAIL is due to the "1.1" rather than "1" for the breakpoint. So apparently, the compiler optimizes a bit more, resulting in two breakpoints instead of one. So, this looks like an independent issue, and I think it could be fixed by just accepting the 1.1, by something like replacing "$decimal" with "$decimal(\\.$decimal)?". Thanks, - Tom