From: Andrew Cagney <ac131313@cygnus.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb@sources.redhat.com
Subject: Re: G packet format ...
Date: Mon, 05 Nov 2001 08:04:00 -0000 [thread overview]
Message-ID: <3BF42F1E.6030803@cygnus.com> (raw)
In-Reply-To: <20011112011400.A13250@nevyn.them.org>
>> >I guess I posted my gdbserver register cache patch before I converted
>> >it to generate them from a shell script. Here's what I've been using.
>> >I didn't consider the issue of only-transferable-in-P-packet registers
>> >(and I still don't see a good reason... well, maybe I can come up with
>> >one, actually. Things that react when read.).
[...]
> I'm a little skeptical of using the P packet for registers
> not-present-in-all-cases, either. Perhaps in the morning I'll be able
> to figure out why.
Not sure it is relevant, however, the following feature of the remote
protocol is interesting.
The G packet contains all registers. There for, if the G packet is
short, GDB assumes that any missing registers are zero.
Consider the sequence:
Target stops. Supplies value for register 1000 in T packet.
User does something to cause register ``0'' to be fetched and this is
done via a G packet.
Two things can happen:
o target supplies GDB with all registers (0..1000)
which makes for a very large G packet.
o target supplies GDB with a subset of registers
(a short packet) and GDB interprets that to mean
that register 1000 should be set to zero.
Ulgh.
By allowing registers beyond the end of a G packet. These problems are
avoided.
A variation on my change might be to allow the target to bundle up more
than the official NR of registers in a G packet. However, not having
them does not mean that they are zero.
enjoy,
Andrew
next prev parent reply other threads:[~2001-11-15 21:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-01 9:37 Andrew Cagney
2001-11-01 10:18 ` Daniel Jacobowitz
2001-11-01 10:30 ` Andrew Cagney
2001-11-01 10:58 ` Daniel Jacobowitz
2001-11-05 8:04 ` Andrew Cagney [this message]
2001-11-01 12:30 ` Fernando Nasser
2001-11-01 12:51 ` Andrew Cagney
2001-11-01 16:51 ` Frank Ch. Eigler
2001-11-02 0:37 ` Andrew Cagney
2001-11-05 8:19 ` 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=3BF42F1E.6030803@cygnus.com \
--to=ac131313@cygnus.com \
--cc=drow@mvista.com \
--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