This is the mail archive of the gdb@sourceware.cygnus.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: ST(i) and MMj


Jim Blandy wrote:
> 
> > During that discussion I did agree that these registers should not be
> > treated as separate, but it seems we meant different things.
> > What I meant was that it is a Bad Idea to maintain separate data for
> > each one of these sets.
> 
> Ah.  I see what you meant now.  Yes, we misunderstood each other.
> 
> > But I don't see why cannot GDB _think_ about %st(X) and %mmY as being
> > separate registers while in reality they share the same data, if this
> > sharing is concealed behind REGISTER_BYTE and REGISTER_RAW_SIZE (and
> > possibly other functions/macros used to manipulate registers).  What
> > are the specific problems with this scheme?
> 
> Grep the sources for NUM_REGS, and look for loops that traverse the
> register set.  Prove to yourself that none of these loops will break
> if register X aliases register Y.  Persuade yourself that nobody in
> the future, innocent of the x86's sins, will write such a loop.
> 
> I tried, but I couldn't manage it.  :)

I agree with Jim.  The way GDB currently resolves register names/numbers
``freaks me out''.
(Now about that REGISTER_VIRTUAL_NAME macro :-)

	Andrew

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