Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Burgess <andrew.burgess@embecosm.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 0/2] [PATCHv2] gdb/riscv: Improved register alias name creation
Date: Thu, 11 Jun 2020 14:16:13 +0100	[thread overview]
Message-ID: <cover.1591880849.git.andrew.burgess@embecosm.com> (raw)
In-Reply-To: <87d0673rmx.fsf@tromey.com>

Tom,

Thanks for the logs, these set me in the right direction to find the
mistake in my patch.

I now have two patches.  The first alone should be enough to get
things working for you now; it's basically the same patch as before
but with a small bug fix.

The second patch is a user experience improvement that seemed obvious
once I understood what was going wrong with the first patch.

After the first patch you should expect to be able to connect to the
remote and see this:

  (gdb) p $dscratch
  Could not fetch register "dscratch"; remote failure reply 'E14'
  (gdb) p $dscratch0
  Could not fetch register "dscratch"; remote failure reply 'E14'

However if you do 'info registers csr' you'll find this line:

  dscratch0       Could not fetch register "dscratch"; remote failure reply 'E14'

Which is a little odd as your target description clearly says you have
'dscratch', not 'dscratch0'.  After the second patch the same info
registers will now report:

  dscratch       Could not fetch register "dscratch"; remote failure reply 'E14'

This leaves just one question from me.  I thought that your original
thread started by saying that once upon a time you could successfully
read the dscratch and/or the dscratch0 registers.  The some patches
landed and you could no longer read the registers.

From what I'm seeing though, the _actual_ failure to read the register
is all QEMU.  So my question, did I missunderstand the original
problem?  Is there a build of GDB where you are able to read actual
values from these registers?

Either way, I think these patches should go in, so let me know if they
help at all.

Thanks,
Andrew

---

Andrew Burgess (2):
  gdb/riscv: Improved register alias name creation
  gdb/riscv: Take CSR names from target description

 gdb/ChangeLog    |  25 +++++++
 gdb/riscv-tdep.c | 170 +++++++++++++++++++++++++++++++----------------
 2 files changed, 137 insertions(+), 58 deletions(-)

-- 
2.25.4



  reply	other threads:[~2020-06-11 13:16 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12 10:00 [0/1] RISC-V: Update CSR to priv 1.11 Nelson Chu
2020-03-12 10:00 ` [PATCH] RISC-V: Update CSR to privileged spec 1.11 Nelson Chu
2020-03-24  5:05   ` [PING] " Nelson Chu
2020-03-24  8:51   ` Andrew Burgess
2020-03-24  9:11     ` Nelson Chu
2020-06-08 15:37 ` [0/1] RISC-V: Update CSR to priv 1.11 Tom Tromey
2020-06-08 21:39   ` Andrew Burgess
2020-06-09  1:19     ` Jim Wilson
2020-06-09 10:27       ` Andrew Burgess
2020-06-09 20:12     ` Tom Tromey
2020-06-09 17:30   ` [RFC] gdb/riscv: Improved register alias name creation Andrew Burgess
2020-06-09 20:14     ` Jim Wilson
2020-06-09 22:47       ` Andrew Burgess
2020-06-10  9:31         ` Nelson Chu
2020-06-10 10:55           ` Andrew Burgess
2020-06-10 13:26             ` Nelson Chu
2020-06-09 20:54     ` Tom Tromey
2020-06-09 22:30       ` Andrew Burgess
     [not found]         ` <8736735bjx.fsf@tromey.com>
2020-06-10 13:01           ` Tom Tromey
2020-06-10 20:37         ` Jim Wilson
2020-06-11  8:28           ` Andrew Burgess
2020-06-09 22:58       ` Andrew Burgess
2020-06-10 12:53         ` Tom Tromey
     [not found]           ` <87mu5b3vm3.fsf@tromey.com>
2020-06-10 14:46             ` Tom Tromey
2020-06-11 13:16               ` Andrew Burgess [this message]
2020-06-11 13:16                 ` [PATCH 1/2] " Andrew Burgess
2020-06-11 13:16                 ` [PATCH 2/2] gdb/riscv: Take CSR names from target description Andrew Burgess
2020-06-11 14:06                 ` [PATCH 0/2] [PATCHv2] gdb/riscv: Improved register alias name creation Tom Tromey
2020-06-12 22:34                   ` Andrew Burgess
2020-06-15 20:27                     ` Tom Tromey
2020-06-16  7:56                       ` Andrew Burgess
2020-06-16 12:03                         ` Tom Tromey
2020-06-16 20:39                           ` Andrew Burgess
2020-06-10 20:34       ` [RFC] " Jim Wilson

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=cover.1591880849.git.andrew.burgess@embecosm.com \
    --to=andrew.burgess@embecosm.com \
    --cc=gdb-patches@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