From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E58F7383FF63; Fri, 9 Dec 2022 13:25:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E58F7383FF63 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670592347; bh=pA4c0ZJZFWOfgxqt3TCg+c3/Q3tFmTTEMrBaRhiiyCg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EnN8osC9m/yozWe/x+DUVGRumFH4P2tPfA4IOanQHkGjmeCcWfkqttUkCvdApUDg2 RXG8NH0GPbJfDumQrhjUUB+XmT9np4yDVg/LmS/PrCsVwGTo9HNFDLo+yQyTTaGFH0 oYqfwgwM/gQGd2Vnaf6kmF+BNrfeG6H/EL+lnyy4= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug tdep/29867] [gdb/tdep, s390x -m31] FAIL: gdb.guile/scm-lazy-string.exp: ptr: print ptr Date: Fri, 09 Dec 2022 13:25:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: tdep X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29867 Tom de Vries changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arnez at linux dot ibm.com, | |cel at us dot ibm.com, | |ulrich.weigand at de dot i= bm.com --- Comment #1 from Tom de Vries --- The problem is in displaced stepping over insn: ... =E2=94=82B+> 0x4005d2 larl %r1,0x4006b0=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =E2=94=82... In the failing case we have: ... (gdb) si (gdb) p /x $r1 $1 =3D 0x3ff804006b0 (gdb)=20 ... In the passing case we have: ... (gdb) si (gdb) p /x $r1 $2 =3D 0x3ff004006b0 ... The difference comes from this code in s390_displaced_step_fixup: ... /* Handle LOAD ADDRESS RELATIVE LONG. */ else if (is_ril (insn, op1_larl, op2_larl, &r1, &i2)) { /* Update PC. */ regcache_write_pc (regs, from + insnlen); /* Recompute output address in R1. */ regcache_cooked_write_unsigned (regs, S390_R0_REGNUM + r1, amode | (from + i2 * 2)); } ... where the "amode |" adds the 0x80000000. Using this patch: ... diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index d0dba7654bb..11b309dc817 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -557,7 +557,7 @@ s390_displaced_step_fixup (struct gdbarch *gdbarch, regcache_write_pc (regs, from + insnlen); /* Recompute output address in R1. */ regcache_cooked_write_unsigned (regs, S390_R0_REGNUM + r1, - amode | (from + i2 * 2)); + (from + i2 * 2)); } /* If we executed a breakpoint instruction, point PC right back at it. = */ ... the test-case passes. I don't understand the architecture well enough to decide what the root cau= se is and whether this patch addresses it. --=20 You are receiving this mail because: You are on the CC list for the bug.=