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: ARM and virtual/raw registers



> Even more ruthless.  Try a register layout of:
> 
> --
> raw normal r0..r15
> raw someothers
> raw floats
> raw bank r0..r15
> raw still more
> --
> pseudo r0..r15
> 	mapped onto either normal or banked
> pseudo floats
> 	mapped onto floats
> and so on, for instance, explict register names to identify normal and 
> banked r0.
> --
> 
> which completly separates the raw and pseudo registers.  The function 
> register_name() becomes:
> 
> 	if regnum < NUM_REGS
> 		return "";
> 	else
> 		return yourtable[regnum - NUM_REGS];

OK, I'm trying this general approach.  One major failure, unfortunately.

The remote-sim code has:

  else if (REGISTER_NAME (regno) != NULL
           && *REGISTER_NAME (regno) != '\0')
    {
      char buf[MAX_REGISTER_RAW_SIZE];
      int nr_bytes;
      if (REGISTER_SIM_REGNO (regno) >= 0)
        nr_bytes = sim_fetch_register (gdbsim_desc,
                                       REGISTER_SIM_REGNO (regno),
                                       buf, REGISTER_RAW_SIZE (regno));
     ...
      supply_register (regno, buf);

Which is precisely the opposite of what I want: sim_fetch_register needs 
to fetch the raw (uncooked) registers, which is precisely the set that 
don't have names :-(

REGISTER_SIM_REGNO doesn't help, because we never get to the code for the 
registers I need.

R.


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