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: Regcache changes broke MIPS


>  mips_register_raw_size (int reg_nr)
> 420     {
> 421       if (mips64_transfers_32bit_regs_p)
> 422         return REGISTER_VIRTUAL_SIZE (reg_nr);
> 423       else if (reg_nr >= FP0_REGNUM && reg_nr < FP0_REGNUM + 32
> 424                && FP_REGISTER_DOUBLE)
> 425         /* For MIPS_ABI_N32 (for example) we need 8 byte floating point
> 426            registers.  */
> 427         return 8;
> 428       else
> 
> 
> I assume that this is because the target has not been initialized yet:
> #if GDB_MULTI_ARCH
> #undef FP_REGISTER_DOUBLE
> #define FP_REGISTER_DOUBLE (gdbarch_tdep (current_gdbarch)->mips_fp_register_double)
> #endif
> 
> You can't use multi-arched macros from _initialize_regcache, I think.


Grumph.

Because GDB isn't 100% multi-arch, it ends up having to use target 
macros from within _initialize_*().  Otherwize non- multi-arch code 
won't start up right.  When multi-arch is enabled, a dummy multi-arch 
vector is used.

Anyway, I think there is something even more messed up here.  First, I'm 
not sure why that function was called from within an _initialize*() 
function.  Secondly, the logic just looks backwards.

I'll do some pokeing.

enjoy,
Andrew


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