This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Adding Registers
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: mckennad at esatclear dot ie
- Cc: Keith Seitz <keiths at redhat dot com>, gdb at sources dot redhat dot com
- Date: Thu, 14 Feb 2002 09:41:49 -0500
- Subject: Re: Adding Registers
- References: <3c948824.1980.0@esatclear.ie>
[I'm changing mailing list to gdb]
> Thanks for the help.
>
> A few more questions. Andrew refers to the internal number of each register.
> I am dealing with a memory mapped register and as such it has no number, how
> is this dealt with in the functions.
>
> Also I have not found were the registers are written, I have gotten as far as
Your target needs to be multi-arch. The architecture methods gdbarch
register read/write let you do anything with a regnum. Including
fetching it from memory.
vis:
foo_register_read (regnum, buf)
{
if (regnum == memory_regnum)
read register from memory;
else
read register from regcache;
}
Andrew