+2002-08-20 Michael Snyder <msnyder@redhat.com>
+
+ * mips-tdep.c (mips_skip_stub, mips_in_call_stub): Make static.
+ (mips_gdbarch_init): Set skip_trampoline_code,
+ in_solib_call_trampoline.
+ * config/mips/tm-mips.h (REGISTER_NAME): Delete.
+ (IN_SOLIB_CALL_TRAMPOLINE, SKIP_TRAMPOLINE_CODE): Delete.
+
2002-08-20 Elena Zannoni <ezannoni@redhat.com>
* ppc-tdep.h (struct gdbarch_tdep): Add ev registers.
#define NUM_REGS 90
#endif
-/* Given the register index, return the name of the corresponding
- register. */
-extern const char *mips_register_name (int regnr);
-#define REGISTER_NAME(i) mips_register_name (i)
-
/* Initializer for an array of names of registers.
There should be NUM_REGS strings in this initializer. */
extern char *mips_read_processor_type (void);
/* Functions for dealing with MIPS16 call and return stubs. */
-#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) mips_in_call_stub (pc, name)
#define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) mips_in_return_stub (pc, name)
-#define SKIP_TRAMPOLINE_CODE(pc) mips_skip_stub (pc)
#define IGNORE_HELPER_CALL(pc) mips_ignore_helper (pc)
extern int mips_in_call_stub (CORE_ADDR pc, char *name);
extern int mips_in_return_stub (CORE_ADDR pc, char *name);
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])
- write_register (regnum,
- read_memory_integer (frame->saved_regs[regnum],
- MIPS_SAVED_REGSIZE));
- }
+ 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));
+ }
+
write_register (SP_REGNUM, new_sp);
flush_cached_frames ();
This function implements the SKIP_TRAMPOLINE_CODE macro.
*/
-CORE_ADDR
+static CORE_ADDR
mips_skip_stub (CORE_ADDR pc)
{
char *name;
/* Return non-zero if the PC is inside a call thunk (aka stub or trampoline).
This implements the IN_SOLIB_CALL_TRAMPOLINE macro. */
-int
+static int
mips_in_call_stub (CORE_ADDR pc, char *name)
{
CORE_ADDR start_addr;
set_gdbarch_store_struct_return (gdbarch, mips_store_struct_return);
set_gdbarch_extract_struct_value_address (gdbarch,
mips_extract_struct_value_address);
+
+ set_gdbarch_skip_trampoline_code (gdbarch, mips_skip_stub);
+
+ set_gdbarch_in_solib_call_trampoline (gdbarch, mips_in_call_stub);
+ /* set_gdbarch_in_solib_return_trampoline (gdbarch, mips_in_return_stub); */
+
return gdbarch;
}