public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Jim Wilson <jimw@sifive.com>
To: Vincent Chen <vincent.chen@sifive.com>
Cc: gdb@sourceware.org, Paul Walmsley <paul.walmsley@sifive.com>
Subject: Re: RISC-V: Is it reasonable to extend current target_description for KGDB?
Date: Tue, 15 Oct 2019 19:53:00 -0000	[thread overview]
Message-ID: <CAFyWVaZdYOAXgZJDP7BLQjX8Bp0kUyquyW0wFQV5ftXZGR85og@mail.gmail.com> (raw)
In-Reply-To: <CABvJ_xgKbD_EUQKqWcr9crNL-XmWv704xPSy1xjZvZzEODEo9Q@mail.gmail.com>

On Tue, Oct 15, 2019 at 12:43 AM Vincent Chen <vincent.chen@sifive.com> wrote:
> namely 32 GPRs, $PC, $sstatus, $sbadaddr and $scause.  Therefore, from
> the viewpoint of KGDB, if the register list of the 'p' packet can
> include these 36 registers, the complex implementation for the
> register query flow will be unnecessary.

We don't have a dedicated RISC-V gdb developer.  If you need gdb
patches, you may need to write them yourself.

Excluding riscv linux native, the other important targets (openocd and
qemu) use xml, and would not be affected by changes to the default
register list.  I don't know how this would affect riscv linux native.
Someone would have to try it and see.  But since we use ptrace instead
of remote, I don't think that it would be affected.  We probably have
other unknown targets that might be affected but no way to identify
them.  There are a lot of people using RISC-V, but not very many
contributing back to the FSF sources, or even the RISC-V Foundation
sources.  I think Maciej may be working on the missing RISC-V
gdbserver port, so his work might be affected, but I would expect
gdbserver to use xml also and hence it should be OK.

One possible solution is to add a RISC-V specific command to choose
the register set used for the default p packet.  That way, if there
are problems with adding registers to it, people have the option to
switch back to the old way.  We already have the "set riscv
use-compressed-breakpoints [auto|on|off]" command.  So we could add a
similar command to choose the number of registers in the default p
packet, try changing the default to the full 36 register set, and wait
to see who complains.  People that complain can be told about the
command to switch back to the old 32 (33?) register set.

Jim

  reply	other threads:[~2019-10-15 19:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15  7:43 Vincent Chen
2019-10-15 19:53 ` Jim Wilson [this message]
2019-10-16 13:21   ` Maciej W. Rozycki
2019-10-17  7:40     ` Vincent Chen
2019-10-16 10:03 ` Pedro Alves
2019-10-16 13:17   ` Maciej W. Rozycki

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=CAFyWVaZdYOAXgZJDP7BLQjX8Bp0kUyquyW0wFQV5ftXZGR85og@mail.gmail.com \
    --to=jimw@sifive.com \
    --cc=gdb@sourceware.org \
    --cc=paul.walmsley@sifive.com \
    --cc=vincent.chen@sifive.com \
    /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).