This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] New register definition interface
- To: ac131313 at cygnus dot com
- Subject: Re: [RFA] New register definition interface
- From: Nick Duffek <nsd at redhat dot com>
- Date: Wed, 17 Jan 2001 16:25:13 -0500
- CC: gdb-patches at sources dot redhat dot com
- References: <3A64CBAE.D480ADB7@cygnus.com>
On 17-Jan-2001, Andrew Cagney wrote:
>> That looks good to me. It's very similar to what regs.c does, except that
>> it calls set_gdbarch_register_list() instead of set_gdbarch_data().
>The difference is that the data is kept private to the regs.c file
>(those interfaces again). It isn't possible for external code to go
>grubbing around in internals when you're not looking.
Yes. I wrote:
>I can deal with the memory waste by:
>
> 1. ignoring it;
> 2. using regs.c's approach with e.g. CLIREGS_INTERNAL instead of
> REGISTER_LIST;
> 3. implementing set_gdbarch_data().
>
>I'd prefer 2 or 3. Do you have a preference?
If I understand correctly, you're expressing a preference for 3. I'll
look into implementing that.
On 17-Jan-2001, Andrew Cagney wrote:
>The nice thing about REGISTER_MODULE_INSTALLED_P() is that it is so
>informative that the caller can conclude nothing about the actual
>module. This is a good thing :-)
I don't understand whether that means "regcache.c is active" or "regs.c is
active". I'd rather use REGCACHE_MODULE_ACTIVE_P(), okay?
Nick