2003-01-08 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Wed, 8 Jan 2003 19:45:23 +0000 (19:45 +0000)
committerAndrew Cagney <cagney@redhat.com>
Wed, 8 Jan 2003 19:45:23 +0000 (19:45 +0000)
* cris-tdep.c (cris_frame_init_saved_regs): Use
get_frame_saved_regs and SIZEOF_FRAME_SAVED_REGS when copying a
saved_regs buffer.
* sh-tdep.c (sh_nofp_frame_init_saved_regs): Ditto.
(sh64_nofp_frame_init_saved_regs): Ditto.
(sh_fp_frame_init_saved_regs): Ditto.
* arm-tdep.c: Use deprecated_set_frame_saved_regs_hack.
* mips-tdep.c (mips_init_extra_frame_info): Ditto.
* mcore-tdep.c (analyze_dummy_frame): Ditto.
* mn10300-tdep.c (analyze_dummy_frame): Ditto.

gdb/ChangeLog
gdb/arm-tdep.c
gdb/cris-tdep.c
gdb/mcore-tdep.c
gdb/mips-tdep.c
gdb/mn10300-tdep.c
gdb/sh-tdep.c

index 40d765184fa686e96852d44c2fb5dea447c654f6..3cd85e78f8c79fc5bb16dfe7d5f4a3285de99c22 100644 (file)
@@ -1,3 +1,16 @@
+2003-01-08  Andrew Cagney  <cagney@redhat.com>
+
+       * cris-tdep.c (cris_frame_init_saved_regs): Use
+       get_frame_saved_regs and SIZEOF_FRAME_SAVED_REGS when copying a
+       saved_regs buffer.
+       * sh-tdep.c (sh_nofp_frame_init_saved_regs): Ditto.
+       (sh64_nofp_frame_init_saved_regs): Ditto.
+       (sh_fp_frame_init_saved_regs): Ditto.
+       * arm-tdep.c: Use deprecated_set_frame_saved_regs_hack.
+       * mips-tdep.c (mips_init_extra_frame_info): Ditto.
+       * mcore-tdep.c (analyze_dummy_frame): Ditto.
+       * mn10300-tdep.c (analyze_dummy_frame): Ditto.
+
 2003-01-08  Daniel Jacobowitz  <drow@mvista.com>
 
        * minsyms.c (lookup_minimal_symbol): Update comment.
index 5d8fbfc0ce84ced150ab90cf7c97f2e2e8383f71..7ff473f2de97d4476b3d441c3ec2208a37c7a6dc 100644 (file)
@@ -3029,10 +3029,12 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   /* We can't use NUM_REGS nor NUM_PSEUDO_REGS here, since that still
      references the old architecture vector, not the one we are
      building here.  */
-  prologue_cache->saved_regs = (CORE_ADDR *)
-    xcalloc (1, (sizeof (CORE_ADDR)
-                * (gdbarch_num_regs (gdbarch)
-                   + gdbarch_num_pseudo_regs (gdbarch))));
+  {
+    CORE_ADDR *saved_regs = xcalloc (1, (sizeof (CORE_ADDR)
+                                        * (gdbarch_num_regs (gdbarch)
+                                           + gdbarch_num_pseudo_regs (gdbarch))));
+    deprecated_set_frame_saved_regs_hack (prologue_cache, saved_regs);
+  }
 
   return gdbarch;
 }
index 065ba3d2f472f825bbf08ef18acf6ce51fb04ed0..3f274160e9aee226f501af84043ed264c9fc0fc9 100644 (file)
@@ -1174,7 +1174,7 @@ cris_frame_init_saved_regs (struct frame_info *fi)
       /* I don't see this ever happening, considering the context in which
          cris_frame_init_saved_regs is called (always when we're not in
          a dummy frame).  */
-      memcpy (&fi->saved_regs, dummy_regs, sizeof (fi->saved_regs));
+      memcpy (get_frame_saved_regs (fi), dummy_regs, SIZEOF_FRAME_SAVED_REGS);
     }
   else
     {    
index 71acfd2bd863a6c036b12ba033b8fba033dddb99..134f9ddbdb2abba468282602f833d8a0d5f76ec2 100644 (file)
@@ -290,8 +290,10 @@ analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame)
   if (dummy == NULL)
     {
       struct frame_extra_info *extra_info;
+      CORE_ADDR *saved_regs;
       dummy = deprecated_frame_xmalloc ();
-      dummy->saved_regs = (CORE_ADDR *) xmalloc (SIZEOF_FRAME_SAVED_REGS);
+      saved_regs = (CORE_ADDR *) xmalloc (SIZEOF_FRAME_SAVED_REGS);
+      deprecated_set_frame_saved_regs_hack (dummy, saved_regs);
       extra_info = XMALLOC (struct frame_extra_info);
       deprecated_set_frame_extra_info_hack (dummy, extra_info);
     }
index f6aecd82028ee3be7357be365804b47579f371b6..4615b3bdbfea4ea390729d707917ab116d575996 100644 (file)
@@ -2476,7 +2476,7 @@ mips_init_extra_frame_info (int fromleaf, struct frame_info *fci)
 
   frame_extra_info_zalloc (fci, sizeof (struct frame_extra_info));
 
-  fci->saved_regs = NULL;
+  deprecated_set_frame_saved_regs_hack (fci, NULL);
   get_frame_extra_info (fci)->proc_desc =
     proc_desc == &temp_proc_desc ? 0 : proc_desc;
   if (proc_desc)
index 1921e4bcac0a0ed7ef4b22ce89a49bdb80e7587b..e1f86176cad6d5c6cb188cbe56aa2029cc047239 100644 (file)
@@ -154,8 +154,10 @@ analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame)
   if (dummy == NULL)
     {
       struct frame_extra_info *extra_info;
+      CORE_ADDR *saved_regs;
       dummy = deprecated_frame_xmalloc ();
-      dummy->saved_regs = xmalloc (SIZEOF_FRAME_SAVED_REGS);
+      saved_regs = xmalloc (SIZEOF_FRAME_SAVED_REGS);
+      deprecated_set_frame_saved_regs (dummy, saved_regs);
       extra_info = XMALLOC (struct frame_extra_info);
       deprecated_set_frame_extra_info_hack (dummy, extra_info);
     }
index cb7059b66894a7b7c3608cb1dfe98478add940af..08281badd0ef441b344f4da1a2fc8643bc12d94c 100644 (file)
@@ -1078,7 +1078,7 @@ sh_nofp_frame_init_saved_regs (struct frame_info *fi)
       /* DANGER!  This is ONLY going to work if the char buffer format of
          the saved registers is byte-for-byte identical to the 
          CORE_ADDR regs[NUM_REGS] format used by struct frame_saved_regs! */
-      memcpy (fi->saved_regs, dummy_regs, sizeof (fi->saved_regs));
+      memcpy (get_frame_saved_regs (fi), dummy_regs, SIZEOF_FRAME_SAVED_REGS);
       return;
     }
 
@@ -1418,7 +1418,7 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi)
       /* DANGER!  This is ONLY going to work if the char buffer format of
          the saved registers is byte-for-byte identical to the 
          CORE_ADDR regs[NUM_REGS] format used by struct frame_saved_regs! */
-      memcpy (fi->saved_regs, dummy_regs, sizeof (fi->saved_regs));
+      memcpy (get_frame_saved_regs (fi), dummy_regs, SIZEOF_FRAME_SAVED_REGS);
       return;
     }
 
@@ -1619,7 +1619,7 @@ sh_fp_frame_init_saved_regs (struct frame_info *fi)
       /* DANGER!  This is ONLY going to work if the char buffer format of
          the saved registers is byte-for-byte identical to the 
          CORE_ADDR regs[NUM_REGS] format used by struct frame_saved_regs! */
-      memcpy (fi->saved_regs, dummy_regs, sizeof (fi->saved_regs));
+      memcpy (get_frame_saved_regs (fi), dummy_regs, SIZEOF_FRAME_SAVED_REGS);
       return;
     }