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: [RFC]: Pseudo-registers for GDB


> Date: Fri, 07 Jul 2000 12:43:07 -0700
> From: Michael Snyder <msnyder@cygnus.com>
> 
> I want to add a general feature to GDB that will allow
> a target architecture to define pseudo-registers
> (things that are treated and accessed like registers, 
> but perhaps not represented in actual hardware and not
> fetched from the target like real registers).

I'm for this.  One other application of this feature would be the FP
registers of x86 that double as MMX registers.

> As a first step, I propose to move the register cache from
> its present ill-concieved location in findvar.c into its own
> module (tentatively named regcache.c), and to make it a true
> data object (with access functions to replace the direct 
> access that some modules now make).

Yes, this needs to be done first.

However, there's one more complication that makes this feature hard to
implement.  When several logical registers share the same physical
ones, GDB needs to know which interpretation is currently used by the
inferior.  Otherwise, GDB will attempt to write to the same storage
twice, each time with different contents, because the application
layer of GDB does treat all the registers as separate entities.

One way to handle this would be to make the distinction between the
real and virtual registers be dynamic rather than static, e.g., by
defining a function which says whether a given register is a real or a
virtual one.

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