From: Daniel Jacobowitz <drow@false.org>
To: Ramana Radhakrishnan <ramana.radhakrishnan@codito.com>
Cc: gdb@sourceware.org
Subject: Re: RFC: Available registers as a target property
Date: Tue, 10 May 2005 21:14:00 -0000 [thread overview]
Message-ID: <20050510211352.GB12075@nevyn.them.org> (raw)
In-Reply-To: <42800617.3090701@codito.com>
On Tue, May 10, 2005 at 06:23:43AM +0530, Ramana Radhakrishnan wrote:
> Hi,
>
> <snip>
>
> >Also, it operates at an "optional feature" level rather than an "optional
> >register" level. The ARM RDI protocol has a nifty feature called
> >Self-Describing Modules, which allows coprocessors to describe themselves
> >to
> >the debugger, including describing their register sets. It includes both
> >user-level information (name and type - along with a complicated type
> >description language) and implementation information (like the ARM mode in
> >which the register is accessible, for banked registers). I would like
> >the GDB solution to this problem to be sufficiently flexible to work with
> >SDM - both because it's a nice model and because that way we can be
> >compatible with ARM debug servers, given an adequate RDI proxy.
>
> On the ARC there are extension encoding sections (Look at
> .arcextmaps created in binutils for extension directives. )
> which describe such registers by the binary. Its possible to
> rename registers with other names and to specify other such
> names for auxiliary registers. Using such a mechanism would
> definitely be useful . Again its possible that the same
> registers appear with different data formats in different
> configurations of the core.
It sounds like, if the target does not support reporting its formats,
we could query the binary for them. In fact, this fits onto the
existing target stack. The BFD target would use a gdbarch method to
query the binary for this information. If the remote target supported
the query, we would ignore the binary's data; otherwise, we would use
it.
What other kinds of information may be in this section? Does this
interface offer enough room to make use of them?
> Can one add a gdbarch_defined_type where the arch interprets
> the raw bit stream to provide the user with a decent view of
> the registers . It so happens that there are many status
> registers which are essentially bitfields , so having this
> as a hook for gdbarch to use for printing register values
> might be useful. An example where this could be used would
> be printing the status flags for e.g. on the i386. (One
> could print the ZNCV values automatically. )
Someone posted a patch to do this for i386 years ago. It got held up,
I don't remember why.
> Also a way of describing reggroups in this protocol would be
> very useful and conditions underwhich these are allowed to
> exist would be something interesting. (would typically be
> the presence of a sequence of bits in some bcr obtainable by
> basic bitwise arithmetic on some BCR values. )
I'm afraid you've lost me. Could you try explaining that whole
paragraph again? Oh... I think I see... I'm assuming BCR is something
like "board configuration register". I'm further assuming that this is
going to be a hardwired register, not runtime configurable. Is that
right?
Others have already persuaded me that we need some way to describe
groupings of registers. But I don't think that this logic you're
describing is appropriate to live in GDB. If some registers are only
available in some board configurations, the target stub should read the
BCR, work out which are available in _this_ configuration, and report
those.
--
Daniel Jacobowitz
CodeSourcery, LLC
next prev parent reply other threads:[~2005-05-10 21:14 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
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 [this message]
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=20050510211352.GB12075@nevyn.them.org \
--to=drow@false.org \
--cc=gdb@sourceware.org \
--cc=ramana.radhakrishnan@codito.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