From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 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-out2.suse.de (Postfix) with ESMTPS id 4F97B1FDB3; Fri, 9 Dec 2022 09:42:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1670578958; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=tRneY/32XJ1DKR3aWl1uqZIBahJgEM54DkDXTXpNWLU=; b=Et9aPcsk/PcpHn4KjLcovyNarTSu/SVYo7sgJjbk7wYQAmfFxYZyVlvKmMVn2M1I/Gv7pD U1hwZD2MLvlDIIHH2qg6ZriM0GHb5+wiWT/0iKHW40MiMGI/PQIIi+2terfSlh1feHNx5g VvUJUslpnx5rW9WK9ndQgP5cmusftwQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1670578958; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=tRneY/32XJ1DKR3aWl1uqZIBahJgEM54DkDXTXpNWLU=; b=UwponyKIFaaS7+j9hbjOa0WFE0hysNdIIoLQv1BL265+MNwgfWWyddhf5eCZ9FsC9px4o3 8MVO02LgrIYptjDA== 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 From: Tom de Vries 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 Content-Transfer-Encoding: 8bit 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 List-Id: 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(-) 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" base-commit: cd3866b6d07b37258eb840443537baa163877e24 -- 2.35.3