From: Andrew Cagney <ac131313@cygnus.com>
To: Daniel Jacobowitz <dmj+@andrew.cmu.edu>
Cc: gdb@sources.redhat.com
Subject: Re: parcelling up struct gdbarch
Date: Mon, 16 Jul 2001 12:04:00 -0000 [thread overview]
Message-ID: <3B533AAD.1060300@cygnus.com> (raw)
In-Reply-To: <20010716112536.A19620@nevyn.them.org>
> legacy_breakpoint_from_pc, default_memory_insert_breakpoint, etc. It
> also brings in gdb_stdout, which means we need main.o. It's hopeless.
If GDBserver is going to be come more tightly integrated into GDB then
it is going to need to pick up some baggage like ui-file.
>> REGISTER_BYTES is hard, I'll ignore it for the moment :-)
>
>
> Such a pity :) It's the one that really bugs me.
It is just a symptom of the below.
>> The gdbserver code that refers to those macros has, has a result of the
>> above revalation, become wrong. The nat code, in general, should refer
>> to nat, raw or G register numbering and not cooked registers. When it
>> comes to the registers to pass back with the T packet, I think it should
>> be given an explicit list.
>
>
> It doesn't refer to those register numbers when generating a G packet
> at all. It just passes the entire buffer. The only issue in creation
> of G packets is REGISTER_BYTES.
Hmm, by ``G packet registers'' I'm refering to how registers are laid
out for a G packet. When the stub creates a T packet that includes
expedited registers, those registers should be identified using their
G-packet numbering.
> It's the T packet that uses them, currently. outreg() sends
> regno:value pairs; regno is a cooked regno. This is the only use of
> REGISTER_BYTE or REGISTER_RAW_SIZE outside of a low-* file.
And it's wrong.
Per other e-mail, gdbserver can have either:
o *-nat.c map system registers onto
raw register and then gdbserver
map raw registers onto G-registers
o *-nat.c map system registers onto
G-registers directly (when compiled
for GDBSERVER, say).
The thing the *-nat and GDB server code shouldn't be doing is trying to
map registers onto internal-to-GDB cooked registers. (Keep in mind that
the existing code base largely doesn't follow this :-( ).
Regardless, remote.c then has to map the incomming G-register onto the
raw registers (as stored in regcache).
> What would you say to providing this list in the form of (cooked regno,
> raw offset, raw size) in the nm.h file? It's very fragile, but without
> protocol changes it's the best we can do right now.
No, something completly outside of *.h that defines the G-packet layout
(and possibly the register cache) and how *-nat.c should map registers
onto it.
> I'm willing to do all sorts of intrusive things to gdbserver to work
> around this for now; as I've said, that gdbserver built for two of the
> targets I tried appears to be almost accidental. I've no qualms about
> breaking it on any number of other targets, if the fixes are cleaner
> than the current state.
This won't (famous last words :-) break any targets and will help the
task of multi-arching the MIPS.
Try building a few different MIPS targets and compare how the G-packet
(unfortunatly aka raw register buffer) is structured for each - (almost)
every single MIPS target has a different G-packet structure and they are
not upward/downward compatible.
Andrew
next prev parent reply other threads:[~2001-07-16 12:04 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-13 0:16 Daniel Jacobowitz
2001-07-13 12:35 ` Andrew Cagney
2001-07-13 14:53 ` Daniel Jacobowitz
2001-07-14 8:33 ` Andrew Cagney
2001-07-16 11:25 ` Daniel Jacobowitz
2001-07-16 11:27 ` H . J . Lu
2001-07-16 12:04 ` Andrew Cagney [this message]
2001-07-16 12:34 ` J.T. Conklin
2001-07-16 15:30 ` Andrew Cagney
2001-07-16 15:40 ` Daniel Jacobowitz
2001-07-16 17:24 ` gdbserver (was Re: parcelling up struct gdbarch) Fabrice Gautier
2001-07-16 21:17 ` Daniel Jacobowitz
2001-07-16 22:22 ` Fabrice Gautier
2001-07-16 22:28 ` Daniel Jacobowitz
2001-07-17 10:00 ` Andrew Cagney
2001-07-17 10:11 ` Daniel Jacobowitz
2001-07-17 11:10 ` Andrew Cagney
2001-07-17 11:21 ` Daniel Jacobowitz
2001-07-17 11:46 ` Andrew Cagney
2001-07-17 10:36 ` Quality Quorum
2001-07-16 13:05 ` parcelling up struct gdbarch Daniel Jacobowitz
2001-07-16 15:15 ` Andrew Cagney
2001-07-16 15:49 ` Daniel Jacobowitz
2001-07-17 10:46 ` Andrew Cagney
2001-07-17 11:03 ` Daniel Jacobowitz
2001-07-17 11:37 ` Andrew Cagney
2001-07-18 13:21 ` Daniel Jacobowitz
2001-07-18 22:53 ` Andrew Cagney
2001-07-18 23:22 ` Daniel Jacobowitz
2001-07-19 0:23 ` Daniel Jacobowitz
2001-07-19 7:51 ` Andrew Cagney
2001-07-19 7:44 ` Andrew Cagney
2001-07-18 8:09 ` Andrew Cagney
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=3B533AAD.1060300@cygnus.com \
--to=ac131313@cygnus.com \
--cc=dmj+@andrew.cmu.edu \
--cc=gdb@sources.redhat.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