From: Chris Zankel <zankel@tensilica.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb@sources.redhat.com
Subject: Re: RFC: Available registers as a target property
Date: Mon, 09 May 2005 21:33:00 -0000 [thread overview]
Message-ID: <427FD70E.2050608@tensilica.com> (raw)
In-Reply-To: <20050506162029.GA30792@nevyn.them.org>
Daniel Jacobowitz wrote:
> Here's my current idea for an improved interface.
Great!
> GDB then reads the TARGET_OBJECT_AVAILABLE_REGISTERS object from the target,
> parses it, and hands it to the gdbarch for final processing. This means
> that the object must have a target-independent format, although it will
> have target-dependent content also.
I am wondering if it would also make sense to support the other way
around and let GDB tell the target about the processor/register
configuration. A scenario for this would be where GDB talks to an OCD
daemon (=target) that controls the processor via JTAG. The daemon
wouldn't need to know everything about the processor configuration.
> First of all, the target object. It can describe either individual
> registers or register sets known to the target (for brevity). Each
> component is an ASCII string. Colon is used as a field delimiter and
> semicolon as a component delimiter. A register set would look like:
>
> set:<NAME>:<PROTOCOL NUMBER>
Sorry, but what do you mean by 'protocol number'? Is that 'pnum' in
remote.c?
The reason why I ask this is because although the current remote.c file
supports pnums, they are currently mapped 1:1 to regnum. It would be
great if you could allow a gdbarch to modify the that mapping.
I guess this is what you mean by the following:
> The architecture would have to register the remote protocol <-> gdb
> regcache number mapping.
Do you intend to introduce a gdbarch function (for example,
gdbarch_pnum_to_regnum_p) and use it to define the pnum value in
remote.c (and other files)?
For example, in remote.c you could use something like this:
for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++)
{
struct packet_reg *r = &rs->regs[regnum];
if (gdbarch_pnum_to_regnum_p)
r->pnum = gdbarch_pnum_to_regnum(regnum);
else
r->pnum = regnum;
In our case (Tensilica-Xtensa), we have a non-sequential register
encoding and use the pnum <-> regnum mapping. For example, all address
registers might have a pnum 0x10XX, special register 0x11XX, etc.
> For instance, if MIPS used this feature to expect 32-bit
> vs 64-bit GPRs, it would be desirable to continue using a g/G packet for
> those.
I think that would be a nice feature. However, it probably requires
quite a few changes to the register cache, does it not?
~Chris
next prev parent reply other threads:[~2005-05-09 21:33 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-06 16:20 Daniel Jacobowitz
2005-05-07 10:25 ` Eli Zaretskii
2005-05-07 16:19 ` Daniel Jacobowitz
2005-05-07 19:37 ` Eli Zaretskii
2005-05-09 15:37 ` Daniel Jacobowitz
2005-05-09 20:58 ` Eli Zaretskii
2005-05-07 16:04 ` Mark Kettenis
2005-05-09 16:20 ` Daniel Jacobowitz
2005-05-09 15:57 ` Paul Brook
2005-05-09 16:32 ` Daniel Jacobowitz
2005-05-09 21:33 ` Chris Zankel [this message]
2005-05-09 23:07 ` Daniel Jacobowitz
2005-05-10 0:23 ` Chris Zankel
2005-05-10 21:08 ` Daniel Jacobowitz
2005-05-12 23:35 ` Chris Zankel
2005-05-17 14:03 ` Daniel Jacobowitz
2005-05-10 0:54 ` Ramana Radhakrishnan
2005-05-10 21:14 ` Daniel Jacobowitz
2005-05-17 19:32 ` Daniel Jacobowitz
2005-05-18 9:29 ` Richard Earnshaw
2005-05-19 1:00 ` Daniel Jacobowitz
2005-05-20 14:54 ` Richard Earnshaw
2005-05-09 22:39 Paul Schlie
2005-05-10 0:03 Paul Schlie
2005-05-10 11:12 Paul Schlie
2005-05-17 23:08 Paul Schlie
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=427FD70E.2050608@tensilica.com \
--to=zankel@tensilica.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