diff options
author | Michael Snyder <msnyder@vmware.com> | 2002-08-20 22:44:55 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2002-08-20 22:44:55 +0000 |
commit | 757a7cc676c8decbdc2fd9f6b9d5289bf3fe54da (patch) | |
tree | 64b634146991b6734de32cf21242469b21b4678d /gdb/mips-tdep.c | |
parent | c8001721f331445b9f9139facc8f742491868b18 (diff) | |
download | gdb-757a7cc676c8decbdc2fd9f6b9d5289bf3fe54da.zip gdb-757a7cc676c8decbdc2fd9f6b9d5289bf3fe54da.tar.gz gdb-757a7cc676c8decbdc2fd9f6b9d5289bf3fe54da.tar.bz2 |
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.
Diffstat (limited to 'gdb/mips-tdep.c')
-rw-r--r-- | gdb/mips-tdep.c | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 6f74df2..79ce042 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -3773,13 +3773,22 @@ 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]) - 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 (); @@ -5218,7 +5227,7 @@ mips_breakpoint_from_pc (CORE_ADDR * pcptr, int *lenptr) This function implements the SKIP_TRAMPOLINE_CODE macro. */ -CORE_ADDR +static CORE_ADDR mips_skip_stub (CORE_ADDR pc) { char *name; @@ -5301,7 +5310,7 @@ mips_skip_stub (CORE_ADDR pc) /* 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; @@ -5998,6 +6007,12 @@ mips_gdbarch_init (struct gdbarch_info info, 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; } |