From: "Michael Snyder" <Michael.Snyder@palmsource.com>
To: "Yoshinori Sato" <ysato@users.sourceforge.jp>,
"gdb-patches" <gdb-patches@sourceware.org>
Subject: RE: [RFC] h8300 "info registers" fix
Date: Tue, 12 Sep 2006 20:28:00 -0000 [thread overview]
Message-ID: <0F4DF2E21F33DD46BE7B8CDEEB0E16D307EAA2@ussunex01.palmsource.com> (raw)
In-Reply-To: <m23bax9ld1.wl%ysato@users.sourceforge.jp>
> A result of ccr and exr mistakes by a "info registers" of h8300 target.
> There was two faults.
>
> - A name of E_CCR_REGNUM is not defined with h8300_register_name.
> Accordingly regcache_raw_read of h8300_pseudo_regitser_read fails.
> - Assume size of E_PSEUDO_CCR_REGNUM by 1 byte with h8300_register_type.
> But assume 4 bytes from a remote target.
> Accordingly cannot take response of remote side to be really.
>
> I correct an issue of a thing of the patch box which I attached.
> The issue was corrected, but not know you whether this is good technique.
I'm sorry, but I don't think this is right.
E_CCR_REGNUM is the physical register which gdb reads from the target.
This is defined to be 4 bytes, even though only 1 byte is significant.
It's just easier to keep most or all of the registers to the same size
within the register message packet.
E_PSEUDO_CCR_REGNUM is a "pseudo-register", which gdb computes internally
(rather than requesting from the target). It is defined to be 1 byte, and
it is the register that gdb displays to the user. In this case, the
computation of the pseudo-register is simply copying the one significant
byte from the physical register.
The fact that E_CCR_REGNUM has no display-name is deliberate. That
register is never displayed, it is only fetched from the target and
used to obtain the value of E_PSEUDO_CCR_REGNUM (which is displayed).
If you are working on the target side (gdb stub, simulator, or gdbserver),
you only have to worry about E_CCR_REGNUM, but you need to supply it as
four bytes. I forget whether the MSB or the LSB is the significant one,
but you should not have too much trouble to figure it out. The other
bytes can be any value - they'll be ignored.
Michael
next prev parent reply other threads:[~2006-09-12 20:28 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-12 15:05 Yoshinori Sato
2006-09-12 20:28 ` Michael Snyder [this message]
2006-09-13 2:28 ` Yoshinori Sato
2006-09-13 15:54 ` Yoshinori Sato
2006-09-13 20:05 ` Michael Snyder
2006-09-13 20:09 ` Daniel Jacobowitz
2006-09-13 20:23 ` Michael Snyder
2006-09-13 20:30 ` Daniel Jacobowitz
2006-09-13 20:59 ` Michael Snyder
2006-09-23 1:08 ` Mark Kettenis
2006-09-23 1:06 ` Mark Kettenis
2006-09-23 3:20 ` Jim Blandy
2006-09-23 3:26 ` Daniel Jacobowitz
2006-09-14 9:40 ` Yoshinori Sato
2006-09-19 16:28 ` Yoshinori Sato
2006-09-23 18:00 ` Mark Kettenis
2006-11-16 8:30 ` Yoshinori Sato
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=0F4DF2E21F33DD46BE7B8CDEEB0E16D307EAA2@ussunex01.palmsource.com \
--to=michael.snyder@palmsource.com \
--cc=gdb-patches@sourceware.org \
--cc=ysato@users.sourceforge.jp \
/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