* arch-utils.c (generic_register_raw_size): New function.
* gdbarch.sh (REGISTER_RAW_SIZE): Use generic_register_raw_size as the static default. * gdbarch.c: Regenerate. * arch-utils.h (generic_register_raw_size): Declare. * config/mips/tm-mips.h (REGISTER_RAW_SIZE): Delete macro. * mips-tdep.c (mips_register_raw_size): Make function static. (mips_gdbarch_init): Initialize register_raw_size.
This commit is contained in:
parent
4611fbebb1
commit
46cd78fb46
7 changed files with 37 additions and 13 deletions
|
@ -1,3 +1,15 @@
|
|||
2001-12-09 Andrew Cagney <ac131313@redhat.com>
|
||||
|
||||
* arch-utils.c (generic_register_raw_size): New function.
|
||||
* gdbarch.sh (REGISTER_RAW_SIZE): Use generic_register_raw_size as
|
||||
the static default.
|
||||
* gdbarch.c: Regenerate.
|
||||
* arch-utils.h (generic_register_raw_size): Declare.
|
||||
|
||||
* config/mips/tm-mips.h (REGISTER_RAW_SIZE): Delete macro.
|
||||
* mips-tdep.c (mips_register_raw_size): Make function static.
|
||||
(mips_gdbarch_init): Initialize register_raw_size.
|
||||
|
||||
2001-12-08 Fred Fish <fnf@redhat.com>
|
||||
|
||||
* dwarf2read.c (read_typedef): Replace hand crafted type
|
||||
|
|
|
@ -376,6 +376,17 @@ legacy_virtual_frame_pointer (CORE_ADDR pc,
|
|||
*frame_regnum = FP_REGNUM;
|
||||
*frame_offset = 0;
|
||||
}
|
||||
|
||||
/* Assume the world is flat. Every register is large enough to fit a
|
||||
target integer. */
|
||||
|
||||
int
|
||||
generic_register_raw_size (int regnum)
|
||||
{
|
||||
gdb_assert (regnum >= 0 && regnum < NUM_REGS + NUM_PSEUDO_REGS);
|
||||
return TARGET_INT_BIT / HOST_CHAR_BIT;
|
||||
}
|
||||
|
||||
|
||||
/* Functions to manipulate the endianness of the target. */
|
||||
|
||||
|
|
|
@ -138,4 +138,8 @@ extern int generic_in_solib_call_trampoline (CORE_ADDR pc, char *name);
|
|||
|
||||
extern int generic_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc);
|
||||
|
||||
/* Assume all registers are the same size and a size identical to that
|
||||
of the integer type. */
|
||||
extern int generic_register_raw_size (int regnum);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -175,14 +175,6 @@ extern void mips_do_registers_info (int, int);
|
|||
|
||||
#define REGISTER_BYTE(N) ((N) * MIPS_REGSIZE)
|
||||
|
||||
/* Number of bytes of storage in the actual machine representation for
|
||||
register N. NOTE: This indirectly defines the register size
|
||||
transfered by the GDB protocol. */
|
||||
|
||||
extern int mips_register_raw_size (int reg_nr);
|
||||
#define REGISTER_RAW_SIZE(N) (mips_register_raw_size ((N)))
|
||||
|
||||
|
||||
/* Covert between the RAW and VIRTUAL registers.
|
||||
|
||||
Some MIPS (SR, FSR, FIR) have a `raw' size of MIPS_REGSIZE but are
|
||||
|
|
|
@ -312,7 +312,7 @@ struct gdbarch startup_gdbarch =
|
|||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
generic_register_raw_size,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
|
|
@ -427,7 +427,7 @@ f:2:REGISTER_NAME:char *:register_name:int regnr:regnr:::legacy_register_name::0
|
|||
v:2:REGISTER_SIZE:int:register_size::::0:-1
|
||||
v:2:REGISTER_BYTES:int:register_bytes::::0:-1
|
||||
f:2:REGISTER_BYTE:int:register_byte:int reg_nr:reg_nr::0:0
|
||||
f:2:REGISTER_RAW_SIZE:int:register_raw_size:int reg_nr:reg_nr::0:0
|
||||
f:2:REGISTER_RAW_SIZE:int:register_raw_size:int reg_nr:reg_nr::generic_register_raw_size:0
|
||||
v:2:MAX_REGISTER_RAW_SIZE:int:max_register_raw_size::::0:-1
|
||||
f:2:REGISTER_VIRTUAL_SIZE:int:register_virtual_size:int reg_nr:reg_nr::0:0
|
||||
v:2:MAX_REGISTER_VIRTUAL_SIZE:int:max_register_virtual_size::::0:-1
|
||||
|
|
|
@ -410,8 +410,9 @@ mips_print_extra_frame_info (struct frame_info *fi)
|
|||
paddr_d (fi->extra_info->proc_desc->pdr.frameoffset));
|
||||
}
|
||||
|
||||
/* Convert between RAW and VIRTUAL registers. The RAW register size
|
||||
defines the remote-gdb packet. */
|
||||
/* Number of bytes of storage in the actual machine representation for
|
||||
register N. NOTE: This indirectly defines the register size
|
||||
transfered by the GDB protocol. */
|
||||
|
||||
static int mips64_transfers_32bit_regs_p = 0;
|
||||
|
||||
|
@ -429,6 +430,9 @@ mips_register_raw_size (int reg_nr)
|
|||
return MIPS_REGSIZE;
|
||||
}
|
||||
|
||||
/* Convert between RAW and VIRTUAL registers. The RAW register size
|
||||
defines the remote-gdb packet. */
|
||||
|
||||
int
|
||||
mips_register_convertible (int reg_nr)
|
||||
{
|
||||
|
@ -4075,12 +4079,13 @@ mips_gdbarch_init (struct gdbarch_info info,
|
|||
gdbarch = gdbarch_alloc (&info, tdep);
|
||||
tdep->elf_flags = elf_flags;
|
||||
|
||||
/* Initially set everything according to the ABI. */
|
||||
/* Initially set everything according to the default ABI/ISA. */
|
||||
set_gdbarch_short_bit (gdbarch, 16);
|
||||
set_gdbarch_int_bit (gdbarch, 32);
|
||||
set_gdbarch_float_bit (gdbarch, 32);
|
||||
set_gdbarch_double_bit (gdbarch, 64);
|
||||
set_gdbarch_long_double_bit (gdbarch, 64);
|
||||
set_gdbarch_register_raw_size (gdbarch, mips_register_raw_size);
|
||||
tdep->mips_abi = mips_abi;
|
||||
|
||||
switch (mips_abi)
|
||||
|
|
Loading…
Reference in a new issue