* mips-tdep.c (mips32_heuristic_proc_desc): Clear temp_saved_regs
authorStu Grossman <grossman@cygnus>
Sat, 19 Dec 1998 17:56:40 +0000 (17:56 +0000)
committerStu Grossman <grossman@cygnus>
Sat, 19 Dec 1998 17:56:40 +0000 (17:56 +0000)
on restart.  Fixes problem with backtracing through functions that
use virtual frame pointers.

gdb/ChangeLog
gdb/mips-tdep.c

index 6d17304331ee220e436be59bbdc1c6f532499971..3acdc140d378abb283e02aae068fd154837954df 100644 (file)
@@ -1,5 +1,14 @@
+Sat Dec 19 09:55:09 1998  Stu Grossman  <grossman@babylon-5.cygnus.com>
+
+       * mips-tdep.c (mips32_heuristic_proc_desc):  Clear temp_saved_regs
+       on restart.  Fixes problem with backtracing through functions that
+       use virtual frame pointers.
+
 Fri Dec 18 14:23:34 1998  Andrew Cagney  <cagney@chook>
 
+       * mips-tdep.c (mips_push_arguments): Don't left-shift small
+       structs being passed in a register when an O64 target.
+
        * config/mips/tm-mips.h (enum mips_fpu_type, mips_fpu): Move to
        mips-tdep.c.
 
index 23ab53103cae528c09a5be2adaa24f1f3c7671ba..01e6b040fa206920203874a18db5b0c50de88763 100644 (file)
@@ -1442,6 +1442,7 @@ mips32_heuristic_proc_desc(start_pc, limit_pc, next_frame, sp)
   CORE_ADDR cur_pc;
   CORE_ADDR frame_addr = 0; /* Value of $r30. Used by gcc for frame-pointer */
 restart:
+  memset (&temp_saved_regs, '\0', sizeof(struct frame_saved_regs));
   PROC_FRAME_OFFSET(&temp_proc_desc) = 0;
   PROC_FRAME_ADJUST (&temp_proc_desc) = 0;     /* offset of FP from SP */
   for (cur_pc = start_pc; cur_pc < limit_pc; cur_pc += MIPS_INSTLEN)
@@ -1990,13 +1991,15 @@ mips_push_arguments(nargs, args, sp, struct_return, struct_addr)
                     It does not seem to be necessary to do the
                     same for integral types.
 
-                    Also don't do this adjustment on EABI targets.  */
+                    Also don't do this adjustment on EABI and O64
+                    binaries. */
 
-                 if (!MIPS_EABI &&
-                     TARGET_BYTE_ORDER == BIG_ENDIAN &&
-                     partial_len < MIPS_REGSIZE &&
-                     (typecode == TYPE_CODE_STRUCT ||
-                      typecode == TYPE_CODE_UNION))
+                 if (!MIPS_EABI
+                     && (MIPS_REGSIZE < 8)
+                     && TARGET_BYTE_ORDER == BIG_ENDIAN
+                     && (partial_len < MIPS_REGSIZE)
+                     && (typecode == TYPE_CODE_STRUCT ||
+                         typecode == TYPE_CODE_UNION))
                    regval <<= ((MIPS_REGSIZE - partial_len) * 
                                TARGET_CHAR_BIT);