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: Thu, 12 May 2005 23:35:00 -0000 [thread overview]
Message-ID: <4283E829.1020008@tensilica.com> (raw)
In-Reply-To: <20050510210800.GA12075@nevyn.them.org>
Daniel,
(Sorry for the delay, but I had some mailer problems....)
Daniel Jacobowitz wrote:
> GDB _wouldn't_ need to
> know about the particular configuration. All the configuration
> information GDB needed, it could retrieve from the daemon.
Hmmm... I have to think about it. It sounds like it could work. But that
would be too easy, wouldn't it ;-)
> Sometimes, GDB needs configuration information and the target can
> supply it. Sometimes (apparently) the target needs information about
> its own configuration and GDB can supply it.
>
> I think we'll always be doing one or the other; one endpoint needs to
> have enough information for both rather than GDB needing to negotiate
> with the target. That suggests that the two configuration steps should
> be implemented independently.
Agreed.
> The options are to tell GDB about this directly, or to have the OCD
> tell GDB about the real properties of the target. I obviously prefer
> the latter when possible, because it allows GDB to gracefully handle
> binaries built for one configuration, and run on another configuration
> where they still work (but may be somehow affected by state they can
> not see).
This actually goes back to your comment above - I think. How do you
tread 'pseudo' registers? Would it make sense to add 'flags' to the
'set' command?
set:<NAME>:<PROTOCOL NUMBER>[:<FLAGS>]
>>>>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.
> Do you use a 'g' packet at all? Certainly you're free not to. If you
> do, then I'm not sure what it means with non-sequential pnums.
At this point, we don't. However, with the changes you are planing to
implement (thanks, btw.), we could probably use g/G again.
>>In cases where pnum is not sequential, you would also need a 'reverse'
>>lookup function to get the register from pnum, something like this:
>>
>>static struct packet_reg *
>>packet_reg_from_pnum (struct remote_state *rs, LONGEST pnum)
> You mean, like the function of that same name and implementation
> already in remote.c? Otherwise I'm not sure what you're talking about.
Oops... I wasn't sure if I was looking at our code or the original GDB
sources. It looks like GDB has support for non-sequential pnums, but
doesn't allow to assign them from gdbarch.
~Chris
next prev parent reply other threads:[~2005-05-12 23:35 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 [this message]
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=4283E829.1020008@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