From: Andrew Burgess <andrew.burgess@embecosm.com>
To: Jim Wilson <jimw@sifive.com>
Cc: Joel Brobecker <brobecker@adacore.com>,
Tom Tromey <tom@tromey.com>,
gdb-patches@sourceware.org, Palmer Dabbelt <palmer@sifive.com>,
John Baldwin <jhb@freebsd.org>
Subject: Re: [PATCH] gdb/riscv: Add target description support
Date: Tue, 26 Feb 2019 18:22:00 -0000 [thread overview]
Message-ID: <20190226182201.GH10887@embecosm.com> (raw)
In-Reply-To: <CAFyWVaYei8L9EXihs0zAjjXB40v_caGQs7OAvJ73H0Pc6cjcDg@mail.gmail.com>
* Jim Wilson <jimw@sifive.com> [2019-02-26 09:26:04 -0800]:
> On Mon, Feb 25, 2019 at 9:02 PM Joel Brobecker <brobecker@adacore.com> wrote:
> > I think if QEMU sends an XML with the various register description,
> > then whatever numbering GDB uses by default will no longer apply,
> > and so things should just-work(tm) regardless of what GDB decided
> > to do in terms of register numbering.
>
> Yes, it shouldn't affect qemu until we try to copy the new gdb xml
> files into qemu, at which point we might need to update the qemu
> gdbstub support to work with the changed register numbers. We can
> worry about this later. This issues doesn't need to delay any gdb
> work.
Jim, if you're happy then I'll go ahead and merge the fix-up patch.
I'll summarise the changes in the patch, and what impact I think they
will have now I've had a look at the QEMU code (all these changes are
identical for 32 and 64 bit)...
(1) Added forced register number for register 'zero'. This will
have no impact the default register numbering before had the
x-registers numbered from 0. I added this just to make the
numbering explicit.
(2) Added forced register number 33 to the first floating pointer
register ($ft0). Again, this should have no impact as the
f-registers were traditionally numbered after the 32 x-registers and
the program-counter.
(3) Renumbered fflags, frm, and fcsr as 66, 67, and 68. This is
where the issues will appear for QEMU, Jim's QEMU patch had adopted
the "new" default numbering which placed these registers after the
floating point registers (so they had become 65, 66, and 67).
If we want backward compatibility then we should merge this GDB patch,
and fix QEMU asap to avoid having two incompatible versions in the
wild.
What I don't understand about all this is why QEMU appears to be
discarding one of the big benefits of xml register descriptions; the
ability to disconnect their register numbering from GDB's register
numbering.
Jim: I think your comments above indicate you want my fix merged, but
if you could just confirm then I'll get it merged.
Thanks,
Andrew
next prev parent reply other threads:[~2019-02-26 18:22 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-08 16:08 [RFC] " Andrew Burgess
2018-11-08 18:33 ` John Baldwin
2018-11-08 19:32 ` Palmer Dabbelt
2018-11-08 19:41 ` John Baldwin
2018-11-14 14:29 ` Andrew Burgess
2018-11-14 17:42 ` John Baldwin
2018-11-08 21:57 ` Jim Wilson
2018-11-13 15:05 ` Andrew Burgess
2018-11-13 20:08 ` Pedro Alves
2018-11-14 14:58 ` [PATCH] " Andrew Burgess
2018-11-19 3:51 ` Jim Wilson
2018-11-21 11:23 ` Andrew Burgess
2018-11-21 12:37 ` Eli Zaretskii
2018-11-21 13:19 ` Andrew Burgess
2019-02-22 17:42 ` Tom Tromey
2019-02-22 19:24 ` Jim Wilson
2019-02-23 20:51 ` Andrew Burgess
2019-02-24 6:21 ` Jim Wilson
2019-02-26 5:02 ` Joel Brobecker
2019-02-26 17:26 ` Jim Wilson
2019-02-26 18:22 ` Andrew Burgess [this message]
2019-02-26 18:40 ` Jim Wilson
2019-02-26 19:27 ` Jim Wilson
2019-02-26 20:30 ` Andrew Burgess
2019-02-23 20:40 ` Andrew Burgess
2019-02-26 11:55 ` Joel Brobecker
2019-03-04 16:18 ` Tom Tromey
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=20190226182201.GH10887@embecosm.com \
--to=andrew.burgess@embecosm.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=jhb@freebsd.org \
--cc=jimw@sifive.com \
--cc=palmer@sifive.com \
--cc=tom@tromey.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).