2002-08-15 Michael Snyder <msnyder@redhat.com>

* mips-tdep.c (mips_do_registers_info): Make static.
        (mips_gdbarch_init): Insert mips_do_registers_info into gdbarch.
        * config/mips/tm-mips.h (DO_REGISTERS_INFO): Delete.
This commit is contained in:
Michael Snyder 2002-08-16 03:07:34 +00:00
parent bcb0cc15ad
commit bf1f5b4c04
3 changed files with 21 additions and 46 deletions

View file

@ -8,11 +8,15 @@
REGISTER_CONVERT_TO_RAW, REGISTER_CONVERTIBLE,
MAX_REGISTER_RAW_SIZE, MAX_REGISTER_VIRTUAL_SIZE): Delete.
(TARGET_READ_SP): Delete.
(DO_REGISTERS_INFO): Delete.
* mips-tdep.c (mips_gdbarch_init): Set the above in the gdbarch.
(mips_register_convertible, mips_register_convert_to_virtual,
mips_register_convert_to_raw): Make static.
(mips_read_sp): New function.
(mips_gdbarch_init): Set gdbarch read_sp to mips_read_sp.
(mips_do_registers_info): Make static.
(mips_gdbarch_init): Insert mips_do_registers_info into gdbarch.
2002-08-15 Andrew Cagney <ac131313@redhat.com>

View file

@ -141,12 +141,6 @@ extern const char *mips_register_name (int regnr);
#define PRID_REGNUM 89 /* Processor ID */
#define LAST_EMBED_REGNUM 89 /* Last one */
/* Define DO_REGISTERS_INFO() to do machine-specific formatting
of register dumps. */
#define DO_REGISTERS_INFO(_regnum, fp) mips_do_registers_info(_regnum, fp)
extern void mips_do_registers_info (int, int);
/* Total amount of space needed to store our copies of the machine's
register state, the array `registers'. */

View file

@ -2302,11 +2302,9 @@ mips_frame_chain (struct frame_info *frame)
we loop forever if we see a zero size frame. */
if (PROC_FRAME_REG (proc_desc) == SP_REGNUM
&& PROC_FRAME_OFFSET (proc_desc) == 0
/* The previous frame from a sigtramp frame might be frameless
and have frame size zero. */
&& !frame->signal_handler_caller
/* Check if this is a call dummy frame. */
&& frame->pc != mips_call_dummy_address ())
/* The previous frame from a sigtramp frame might be frameless
and have frame size zero. */
&& !frame->signal_handler_caller)
return 0;
else
return get_frame_pointer (frame, proc_desc);
@ -3356,22 +3354,13 @@ mips_pop_frame (void)
if (frame->saved_regs == NULL)
FRAME_INIT_SAVED_REGS (frame);
for (regnum = 0; regnum < NUM_REGS; regnum++)
if (regnum != SP_REGNUM && regnum != PC_REGNUM
&& frame->saved_regs[regnum])
{
/* Floating point registers must not be sign extended,
in case MIPS_SAVED_REGSIZE = 4 but sizeof (FP0_REGNUM) == 8. */
if (FP0_REGNUM <= regnum && regnum < FP0_REGNUM + 32)
write_register (regnum,
read_memory_unsigned_integer (frame->saved_regs[regnum],
MIPS_SAVED_REGSIZE));
else
write_register (regnum,
read_memory_integer (frame->saved_regs[regnum],
MIPS_SAVED_REGSIZE));
}
{
if (regnum != SP_REGNUM && regnum != PC_REGNUM
&& frame->saved_regs[regnum])
write_register (regnum,
read_memory_integer (frame->saved_regs[regnum],
MIPS_SAVED_REGSIZE));
}
write_register (SP_REGNUM, new_sp);
flush_cached_frames ();
@ -3739,7 +3728,7 @@ do_gp_register_row (int regnum)
/* MIPS_DO_REGISTERS_INFO(): called by "info register" command */
void
static void
mips_do_registers_info (int regnum, int fpregs)
{
if (regnum != -1) /* do one specified register */
@ -4098,28 +4087,15 @@ return_value_location (struct type *valtype,
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
&& len < MIPS_SAVED_REGSIZE)
{
if ((gdbarch_tdep (current_gdbarch) -> mips_abi == MIPS_ABI_N32
|| gdbarch_tdep (current_gdbarch) -> mips_abi == MIPS_ABI_N64)
&& (TYPE_CODE (valtype) == TYPE_CODE_STRUCT
|| TYPE_CODE (valtype) == TYPE_CODE_UNION))
{
/* Values are already aligned in the low register. */
lo->reg_offset = 0;
}
else
{
/* "un-left-justify" the value in the low register */
lo->reg_offset = MIPS_SAVED_REGSIZE - len;
}
hi->reg_offset = 0;
/* "un-left-justify" the value in the low register */
lo->reg_offset = MIPS_SAVED_REGSIZE - len;
lo->len = len;
hi->reg_offset = 0;
hi->len = 0;
}
else if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
&& len > MIPS_SAVED_REGSIZE /* odd-size structs */
&& len < MIPS_SAVED_REGSIZE * 2
&& gdbarch_tdep (current_gdbarch) -> mips_abi != MIPS_ABI_N32
&& gdbarch_tdep (current_gdbarch) -> mips_abi != MIPS_ABI_N64
&& (TYPE_CODE (valtype) == TYPE_CODE_STRUCT ||
TYPE_CODE (valtype) == TYPE_CODE_UNION))
{
@ -4957,7 +4933,6 @@ mips_gdbarch_init (struct gdbarch_info info,
}
}
#undef MIPS_DEFAULT_ABI
#ifdef MIPS_DEFAULT_ABI
if (mips_abi == MIPS_ABI_UNKNOWN)
mips_abi = MIPS_DEFAULT_ABI;
@ -5238,7 +5213,7 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_call_dummy_words (gdbarch, mips_call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (mips_call_dummy_words));
set_gdbarch_push_return_address (gdbarch, mips_push_return_address);
set_gdbarch_register_convertible (gdbarch, generic_register_convertible_not);
set_gdbarch_register_convertible (gdbarch, mips_register_convertible);
set_gdbarch_register_convert_to_virtual (gdbarch,
mips_register_convert_to_virtual);
set_gdbarch_register_convert_to_raw (gdbarch,
@ -5264,6 +5239,8 @@ mips_gdbarch_init (struct gdbarch_info info,
define REGISTER_VIRTUAL_TYPE. */
set_gdbarch_register_virtual_type (gdbarch, mips_register_virtual_type);
set_gdbarch_do_registers_info (gdbarch, mips_do_registers_info);
/* Hook in OS ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch, osabi);