From: Ramana Radhakrishnan <ramana.radhakrishnan@codito.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb@sourceware.org
Subject: Re: RFC: Available registers as a target property
Date: Tue, 10 May 2005 00:54:00 -0000 [thread overview]
Message-ID: <42800617.3090701@codito.com> (raw)
In-Reply-To: <20050506162029.GA30792@nevyn.them.org>
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.
<snip>
> DETAILS
> =======
>
> 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>
>
> No more information is necessary; the register set is an abbreviation of a
> well-defined group of registers that both the stub and GDB have external
> knowledge of. GDB will already know the order, types, and sizes of
> registers, and potentially other details (such as how to pass them as
> arguments to functions). If GDB does not recognize the register set, it can
> safely ignore it, but should issue a warning to the user recommending use of
> a later GDB. If the protocol does not require numbers, they will be
> ignored, but they are non-optional in the syntax.
>
> I have spent less time thinking about how to specify individual registers.
> This should suffice, but if anyone can see cause for another standard field,
> please speak up.
>
> reg:<NAME>:<PROTOCOL NUMBER>:<BITSIZE>:<TYPE>:<TARGET DATA>...
>
> Types unknown to GDB would default to integral display; common types such as
> integral, floating point (native byte order), integral vector, fp vector, et
> cetera would be documented in the manual with fixed names.
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. )
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. )
cheers
Ramana
--
Ramana Radhakrishnan
GNU Tools
codito ergo sum (www.codito.com)
next prev parent reply other threads:[~2005-05-10 0:54 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 [this message]
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=42800617.3090701@codito.com \
--to=ramana.radhakrishnan@codito.com \
--cc=drow@false.org \
--cc=gdb@sourceware.org \
/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