From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 757983892010; Sun, 6 Dec 2020 10:31:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 757983892010 From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug breakpoints/27009] [s390] GDB branches randomly for BC instruction while displaced stepping Date: Sun, 06 Dec 2020 10:31:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: breakpoints X-Bugzilla-Version: 10.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: 10.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2020 10:31:15 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27009 --- Comment #2 from cvs-commit at gcc dot gnu.org --- The gdb-10-branch branch has been updated by Joel Brobecker : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D47c4623c7587= a0008597a4a10a7f32bbac1f7ad4 commit 47c4623c7587a0008597a4a10a7f32bbac1f7ad4 Author: Giancarlo Frix Date: Sun Dec 6 14:30:53 2020 +0400 s390: Fix BC instruction breakpoint handling This fixes a long-lived bug in the s390 port. When trying to step over a breakpoint set on a BC (branch on condition) instruction with displaced stepping on IBM Z, gdb would incorrectly adjust the pc regardless of whether or not the branch was taken. Since the branch target is an absolute address, this would cause the inferior to jump around wildly whenever the branch was taken, either crashing it or causing it to behave unpredictably. It turns out that the logic to handle BC instructions correctly was in the code, but that the enum value representing its opcode has always been incorrect. This patch corrects the enum value to the actual opcode, fixing the stepping problem. The enum value is also used in the prologue analysis code, so this also fixes a minor bug where more of the prologue would be read than was necessary. gdb/ChangeLog: PR breakpoints/27009 * s390-tdep.h (op_bc): Correct BC opcode value. --=20 You are receiving this mail because: You are on the CC list for the bug.=