This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Adding Registers


[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]