From patchwork Fri Dec 9 09:42:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 61725 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DF30D38CC680 for ; Fri, 9 Dec 2022 09:43:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF30D38CC680 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670578982; bh=tRneY/32XJ1DKR3aWl1uqZIBahJgEM54DkDXTXpNWLU=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=MmRyC8SRpPa1SaxwOYnnEZTNNhi49swLz4D5x9WmTlMWIGjntGhBtBlR6aHAajjUl kfBOvwU42f+z3VoHWj1tWQN3IvUkFDTQxQaGju94Ub7xC1hTdTLetdPjypFubtsvnU NpLcTJdXwlaO62JSHk3GRQb/soak5KkTlx2YI1ks= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 11DAF38CC687 for ; Fri, 9 Dec 2022 09:42:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 11DAF38CC687 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-out2.suse.de (Postfix) with ESMTPS id 4F97B1FDB3; Fri, 9 Dec 2022 09:42:38 +0000 (UTC) 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 33A5A13597; Fri, 9 Dec 2022 09:42:38 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id fk98Cw4Dk2MnbQAAMHmgww (envelope-from ); Fri, 09 Dec 2022 09:42:38 +0000 To: gdb-patches@sourceware.org Cc: Ulrich Weigand , Carl Love Subject: [pushed] [gdb/testsuite] Fix gdb.guile/scm-symtab.exp for ppc64le Date: Fri, 9 Dec 2022 10:42:37 +0100 Message-Id: <20221209094237.3736-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tom de Vries via Gdb-patches From: Tom de Vries Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" On powerpc64le-linux, I run into: ... (gdb) PASS: gdb.guile/scm-symtab.exp: step out of func2 guile (print (> (sal-line (find-pc-line (frame-pc (selected-frame)))) line))^M = #f^M (gdb) FAIL: gdb.guile/scm-symtab.exp: test find-pc-line with resume address ... The problem is as follows: the instructions for the call to func2 are: ... 1000070c: 39 00 00 48 bl 10000744 10000710: 00 00 00 60 nop 10000714: 59 00 00 48 bl 1000076c 10000718: 00 00 00 60 nop 1000071c: 00 00 20 39 li r9,0 ... and the corresponding line number info is: ... scm-symtab.c: File name Line number Starting address View Stmt scm-symtab.c 42 0x1000070c x scm-symtab.c 43 0x10000714 x scm-symtab.c 44 0x1000071c x ... The test-case looks at the line numbers for two insns: - the insn of the call to func2 (0x10000714), and - the insn after that (0x10000718), and expects the line number of the latter to be greater than the line number of the former. However, both insns have the same line number: 43. Fix this by replacing ">" with ">=". Tested on x86_64-linux and powerpc64le-linux. --- gdb/testsuite/gdb.guile/scm-symtab.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: cd3866b6d07b37258eb840443537baa163877e24 diff --git a/gdb/testsuite/gdb.guile/scm-symtab.exp b/gdb/testsuite/gdb.guile/scm-symtab.exp index 2ea13ff0d6c..4b8b59c42de 100644 --- a/gdb/testsuite/gdb.guile/scm-symtab.exp +++ b/gdb/testsuite/gdb.guile/scm-symtab.exp @@ -153,5 +153,5 @@ gdb_test "guile (print (= (sal-line (find-pc-line (frame-pc (selected-frame)))) gdb_scm_test_silent_cmd "step" "step into func2" gdb_scm_test_silent_cmd "up" "step out of func2" -gdb_test "guile (print (> (sal-line (find-pc-line (frame-pc (selected-frame)))) line))" \ +gdb_test "guile (print (>= (sal-line (find-pc-line (frame-pc (selected-frame)))) line))" \ "#t" "test find-pc-line with resume address"