From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id C9A4039DD7FF; Fri, 9 Dec 2022 09:41:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C9A4039DD7FF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670578879; bh=ILh642iEstJxx1wLH+ac99A4Bci9CZLIFnBns2Niwdw=; h=From:To:Subject:Date:From; b=HBVZpUqIhA9aWdka4B4BcQi60Rp1LDbT8A3cbbR7tIZsn1lfBh5d1dZfDpYg9wm4c BIlatyHnCUOGjm9OyCReScMqBRAibgjbpxahGR3BvHjZx1lwbLnMbO9vcPQoT6NgQd kdqEYEK9T8QwY2jAtdblTwRe+aM2cu0PMdDLSU3w= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom de Vries To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Fix gdb.guile/scm-symtab.exp for ppc64le X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: cd3866b6d07b37258eb840443537baa163877e24 X-Git-Newrev: 8b272d7671fb9af34fe14bd274e97f05bb299635 Message-Id: <20221209094119.C9A4039DD7FF@sourceware.org> Date: Fri, 9 Dec 2022 09:41:19 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D8b272d7671fb= 9af34fe14bd274e97f05bb299635 commit 8b272d7671fb9af34fe14bd274e97f05bb299635 Author: Tom de Vries Date: Fri Dec 9 10:41:13 2022 +0100 [gdb/testsuite] Fix gdb.guile/scm-symtab.exp for ppc64le =20 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)))) l= ine))^M =3D #f^M (gdb) FAIL: gdb.guile/scm-symtab.exp: test find-pc-line with resume add= ress ... =20 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 ... =20 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 n= umber of the former. =20 However, both insns have the same line number: 43. =20 Fix this by replacing ">" with ">=3D". =20 Tested on x86_64-linux and powerpc64le-linux. Diff: --- 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.gui= le/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 (=3D (sal-line (find-pc-line (fr= ame-pc (selected-frame)))) gdb_scm_test_silent_cmd "step" "step into func2" gdb_scm_test_silent_cmd "up" "step out of func2" =20 -gdb_test "guile (print (> (sal-line (find-pc-line (frame-pc (selected-fram= e)))) line))" \ +gdb_test "guile (print (>=3D (sal-line (find-pc-line (frame-pc (selected-f= rame)))) line))" \ "#t" "test find-pc-line with resume address"