This is the mail archive of the gdb-patches@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]

Re: [RFA] gdbarch.sh: document REGISTER_SIZE and REGISTER_BYTES


Michael Snyder wrote:
> 
> Andrew Cagney wrote:
> 
> > Given that pseudo-register values are created using a fuction and raw
> > register data, do they have any storage?
> 
> Sometimes yes, sometimes no.  A pseudo-register can be just
> an alias for another register, in which case it can share
> storage.  But it can also be a computed value, in which case
> it may have its own storage.  I had one case in which a
> pseudo-register was the concatenation of two regular
> registers -- but they weren't consecutive, so I had to
> give the pseudo its own storage and copy them.

As far as I can tell, in all these cases that pseudo register could have
been implemented as a functon.  The only reason I can think of for
having to allocate storage is to work around warts in the way registers
are currently implemented.  If the core of GDB only accessed registers
using read/write methods then the storage problem could go away.

	enjoy,
		Andrew

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