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: register_offset_hack() vs REGISTER_BYTE()



Er, for a legacy architecture, register_offset_hack(i) (aka current_regcache->descr->register_offset) should be REGISTER_BYTE(i). See init_legacy_regcache_descr.

Sounds like the MIPS is sneeking past:

   /* If an old style architecture, fill in the remainder of the
      register cache descriptor using the register macros.  */
   if (!gdbarch_pseudo_register_read_p (gdbarch)
       && !gdbarch_pseudo_register_write_p (gdbarch)
       && !gdbarch_register_type_p (gdbarch))
     {
       descr->legacy_p = 1;
       init_legacy_regcache_descr (gdbarch, descr);
       return descr;
     }


Hmm, yes. I just added some pseudo registers...

Can probably change REGISTER_BYTE to a pre-initialized method with predicate (see DEPRECATED_PC_IN_CALL_DUMMY for an example), and then add a predicate test for it to the above mix.


Sentinel frame should probably also be switched to using register_offset_hack(), instead of REGISTER_BYTE(), so that it is more consistent with the frame code.

Sounds like it's time to s/ REGISTER_BYTE / DEPRECATED_REGISTER_BYTE /. It isn't yet possible to eliminate that macro from the MIPS since it is that hardwired mystery that defines the MIPS remote protocol :-(

Andrew



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