From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C2AFB383F40A; Sun, 27 Jun 2021 17:52:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C2AFB383F40A From: "ahmedsayeed1982 at yahoo dot com" To: gdb-prs@sourceware.org Subject: [Bug tdep/27015] ARC: "eret" value is collected from the wrong data in register cache Date: Sun, 27 Jun 2021 17:52:24 +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: critical X-Bugzilla-Who: ahmedsayeed1982 at yahoo dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED 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: 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 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, 27 Jun 2021 17:52:24 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27015 Ahmed Sayeed changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ahmedsayeed1982 at yahoo d= ot com --- Comment #2 from Ahmed Sayeed --- --------------8<-------------- if (regnum =3D=3D gdbarch_pc_regnum (gdbarch)) regnum =3D ARC_ERET_REGNUM; regcache->raw_collect (regnum, buf + arc_linux_core_reg_offsets[regnum]); -------------->8-------------- Root cause: Although this is using the correct offset (ERET register's), it is also changing the REGNUM itself. Therefore, raw_collect (regnum, ...) is not reading from "pc" anymore. Consequence: This bug affects the "native ARC gdb" badly and causes kernel code to jump to addresses after the breakpoint and not executing the "breakpoint"ed instructions at all. That "native ARC gdb" feature is not upstream yet and is in review at the time of writing [1]. http://michielleunens.tech/ --=20 You are receiving this mail because: You are on the CC list for the bug.=