From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7873) id BD25B383E81E; Thu, 19 May 2022 13:58:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BD25B383E81E Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tiezhu Yang To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb: testsuite: Support displaced stepping on LoongArch X-Act-Checkin: binutils-gdb X-Git-Author: Tiezhu Yang X-Git-Refname: refs/heads/master X-Git-Oldrev: 02646f1960a53e50c05218725cbf63098bee5bbe X-Git-Newrev: 18bd4744611b97e9fca41f97b871eea7bd66bd3e Message-Id: <20220519135817.BD25B383E81E@sourceware.org> Date: Thu, 19 May 2022 13:58:17 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 May 2022 13:58:17 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D18bd4744611b= 97e9fca41f97b871eea7bd66bd3e commit 18bd4744611b97e9fca41f97b871eea7bd66bd3e Author: Tiezhu Yang Date: Tue May 10 20:44:04 2022 +0800 gdb: testsuite: Support displaced stepping on LoongArch =20 When execute the following command on LoongArch: =20 make check-gdb TESTS=3D"gdb.base/async-shell.exp" =20 we can see the following message in gdb/testsuite/gdb.sum: =20 UNSUPPORTED: gdb.base/async-shell.exp: displaced stepping =20 modify support_displaced_stepping to support displaced stepping on LoongArch. =20 With this patch: =20 PASS: gdb.base/async-shell.exp: run & PASS: gdb.base/async-shell.exp: shell echo foo PASS: gdb.base/async-shell.exp: interrupt PASS: gdb.base/async-shell.exp: process stopped =20 I did the following tests that use support_displaced_stepping with this patch on LoongArch, there is no failed testcases. =20 loongson@linux:~/gdb.git$ grep -r support_displaced_stepping gdb/testsu= ite/gdb.* gdb/testsuite/gdb.arch/disp-step-insn-reloc.exp:if { ![support_displace= d_stepping] } { gdb/testsuite/gdb.base/step-over-no-symbols.exp: if { $displaced != =3D "off" && ![support_displaced_stepping] } { gdb/testsuite/gdb.base/moribund-step.exp:if { ![support_displaced_stepp= ing] } { gdb/testsuite/gdb.base/async-shell.exp:if { ![support_displaced_steppin= g] } { gdb/testsuite/gdb.base/inferior-died.exp:if { ![support_displaced_stepp= ing] } { gdb/testsuite/gdb.base/step-over-syscall.exp: if {$displaced =3D= =3D "on" && ![support_displaced_stepping]} { gdb/testsuite/gdb.mi/mi-watch-nonstop.exp:if { ![support_displaced_step= ping] } { gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp:if { ![support_displaced_= stepping] } { gdb/testsuite/gdb.mi/mi-nonstop.exp:if { ![support_displaced_stepping] = } { gdb/testsuite/gdb.mi/mi-nsmoribund.exp:if { ![support_displaced_steppin= g] } { gdb/testsuite/gdb.mi/mi-nsintrall.exp:if { ![support_displaced_stepping= ] } { gdb/testsuite/gdb.mi/mi-nsthrexec.exp:if { ![support_displaced_stepping= ] } { gdb/testsuite/gdb.mi/mi-nonstop-exit.exp:if { ![support_displaced_stepp= ing] } { gdb/testsuite/gdb.multi/watchpoint-multi.exp:if [support_displaced_step= ping] { gdb/testsuite/gdb.python/py-evthreads.exp:if { ![support_displaced_step= ping] } { gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp: if { $d= isplaced !=3D "off" && ![support_displaced_stepping] } { gdb/testsuite/gdb.threads/interrupt-while-step-over.exp: if { ${disp= laced-stepping} !=3D "off" && ![support_displaced_stepping] } { gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp: if { $d= isplaced !=3D "off" && ![support_displaced_stepping] } { =20 Signed-off-by: Tiezhu Yang Diff: --- gdb/testsuite/lib/gdb.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 97841ca19a1..720418beac2 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -3212,7 +3212,7 @@ proc support_displaced_stepping {} { if { [istarget "x86_64-*-linux*"] || [istarget "i\[34567\]86-*-linux*"] || [istarget "arm*-*-linux*"] || [istarget "powerpc-*-linux*"] || [istarget "powerpc64-*-linux*"] || [istarget "s390*-*-*"] - || [istarget "aarch64*-*-linux*"] } { + || [istarget "aarch64*-*-linux*"] || [istarget "loongarch*-*-linux*"] } { return 1 }