public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "jarilittlenen at yahoo dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug tdep/27015] ARC: "eret" value is collected from the wrong data in register cache
Date: Tue, 14 Sep 2021 12:54:22 +0000	[thread overview]
Message-ID: <bug-27015-4717-lrNcwXdCb4@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-27015-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=27015

Jari Littlenen <jarilittlenen at yahoo dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jarilittlenen at yahoo dot com

--- Comment #14 from Jari Littlenen <jarilittlenen at yahoo dot com> ---
In collect_register() function of arc-linux-tdep.c, the "eret"
(exception return) register value is not being reported correctly.

Background: http://www.canalisationengorgee.fr/
When asked for the "pc" value, we have to update the "eret" register
with GDB's STOP_PC.  The "eret" instructs the kernel code where to
jump back when an instruction has stopped due to a breakpoint.  This
is how collect_register() is doing so:

--------------8<--------------
  if (regnum == gdbarch_pc_regnum (gdbarch))
    regnum = ARC_ERET_REGNUM; https://www.vincentlevi.com/
  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.
http://codefreewifigratuit.xyz/
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]. https://fraisiachris.fr/

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2021-09-14 12:54 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04 15:04 [Bug tdep/27015] New: " shahab.vahedi at gmail dot com
2020-12-04 15:08 ` [Bug tdep/27015] " shahab.vahedi at gmail dot com
2020-12-04 15:10 ` tromey at sourceware dot org
2020-12-04 15:15 ` shahab.vahedi at gmail dot com
2021-06-27 17:52 ` ahmedsayeed1982 at yahoo dot com
2021-07-13  3:12 ` sherrixotyv29 at gmail dot com
2021-07-13  4:59 ` simark at simark dot ca
2021-08-09  9:35 ` phillipsaeverett84 at gmail dot com
2021-08-10 11:44 ` ucelsanicin at yahoo dot com
2021-08-20 15:56 ` kingjamescarl at gmail dot com
2021-08-20 15:56 ` kingjamescarl at gmail dot com
2021-08-20 16:05 ` mark at klomp dot org
2021-08-23  5:22 ` specification166din at gmail dot com
2021-09-02 11:06 ` donipah907 at mtlcz dot com
2021-09-05  7:36 ` kimolsun2020 at yahoo dot com
2021-09-06  9:08 ` focixujo at livinginsurance dot co.uk
2021-09-06  9:12 ` focixujo at livinginsurance dot co.uk
2021-09-10 19:36 ` mehmetgelisin at aol dot com
2021-09-14 12:54 ` jarilittlenen at yahoo dot com [this message]
2021-09-20  8:21 ` johnmartin1458 at gmail dot com
2021-09-20  8:22 ` johnmartin1458 at gmail dot com
2021-09-22  9:08 ` atifarif503 at gmail dot com
2021-09-22  9:08 ` atifarif503 at gmail dot com
2021-09-22 10:18 ` diheto5497 at secbuf dot com
2021-09-22 16:58 ` mervegunesli at aol dot com
2021-10-04  7:54 ` olivernicholle9052 at gmail dot com
2021-10-09 11:00 ` gulsenenginar at aol dot com
2021-10-09 17:51 ` svitvitraga at gmail dot com
2021-10-11  5:19 ` uzey67 at gmail dot com
2021-10-16  0:06 ` mikematic@privacy-mail.top
2021-10-18  8:09 ` pagefitzpatrick687 at gmail dot com
2021-10-18 19:58 ` ahmedsayeed1982 at hotmail dot com
2021-10-19  7:14 ` progonsaytu at gmail dot com
2021-10-19 13:34 ` bart@123-fietsen.nl
2021-10-19 13:49 ` peterverbaarschotrop at gmail dot com
2021-10-24 10:02 ` glassmtech at ukr dot net
2021-10-27  6:50 ` bathroomremodelrr at gmail dot com
2021-10-28  9:09 ` elpasotileinstallation at gmail dot com
2021-11-02  9:50 ` amosohxx90 at gmail dot com
2021-11-03  7:52 ` barronwbs85 at gmail dot com
2021-11-05  9:28 ` bertbxi85 at gmail dot com
2021-11-06 21:13 ` paneki8601 at dukeoo dot com
2021-11-08 11:49 ` richardsboyer67 at gmail dot com
2021-11-12 11:41 ` shannanalt11 at gmail dot com
2021-11-14 20:01 ` brickpavingcl at gmail dot com
2021-11-16 12:40 ` Uchemanuche at gmail dot com
2021-11-16 19:08 ` xecana8007 at funboxcn dot com
2021-11-16 19:15 ` xecana8007 at funboxcn dot com
2021-11-22 13:12 ` cheesecakesuperhuman at gmail dot com
2023-07-14 21:43 ` rleonard85 at gmail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-27015-4717-lrNcwXdCb4@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).