2003-01-07 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Tue, 7 Jan 2003 19:19:00 +0000 (19:19 +0000)
committerAndrew Cagney <cagney@redhat.com>
Tue, 7 Jan 2003 19:19:00 +0000 (19:19 +0000)
* frame.c (deprecated_set_frame_next_hack): New function.
(deprecated_set_frame_prev_hack): New function.
* frame.h (deprecated_set_frame_next_hack): Declare.
(deprecated_set_frame_prev_hack): Declare.
* mcore-tdep.c (analyze_dummy_frame): Use
deprecated_set_frame_next_hack and deprecated_set_frame_prev_hack.
* mn10300-tdep.c (analyze_dummy_frame): Ditto.

gdb/ChangeLog
gdb/frame.c
gdb/frame.h
gdb/mcore-tdep.c
gdb/mn10300-tdep.c

index b042cbb0a2866dfe44ef0221e3a03322629566c4..611d249b2d12da86d119c91fa65fa9e5e1b3ca66 100644 (file)
@@ -1,3 +1,13 @@
+2003-01-07  Andrew Cagney  <cagney@redhat.com>
+
+       * frame.c (deprecated_set_frame_next_hack): New function.
+       (deprecated_set_frame_prev_hack): New function.
+       * frame.h (deprecated_set_frame_next_hack): Declare.
+       (deprecated_set_frame_prev_hack): Declare.
+       * mcore-tdep.c (analyze_dummy_frame): Use
+       deprecated_set_frame_next_hack and deprecated_set_frame_prev_hack.
+       * mn10300-tdep.c (analyze_dummy_frame): Ditto.
+
 2003-01-07  David Carlton  <carlton@math.stanford.edu>
 
        * linespec.c (decode_line_1): Move code into decode_dollar.
index 443f06705c6715f214b6c33e4cdf3a373fa770ac..f09a47b4268b3c1598f593d05fedcdd8241bd780 100644 (file)
@@ -1308,6 +1308,20 @@ deprecated_set_frame_extra_info_hack (struct frame_info *frame,
   frame->extra_info = extra_info;
 }
 
+void
+deprecated_set_frame_next_hack (struct frame_info *fi,
+                               struct frame_info *next)
+{
+  fi->next = next;
+}
+
+void
+deprecated_set_frame_prev_hack (struct frame_info *fi,
+                               struct frame_info *prev)
+{
+  fi->prev = prev;
+}
+
 struct frame_info *
 deprecated_frame_xmalloc (void)
 {
index f593d00f1c7f6ab6a451c5f954e88b13451a0957..2f50eebd878f50473f97f749ddaca52d52ec3a46 100644 (file)
@@ -693,4 +693,12 @@ extern struct frame_info *deprecated_frame_xmalloc (void);
 extern struct frame_info *deprecated_frame_xmalloc_with_cleanup (long sizeof_saved_regs,
                                                                 long sizeof_extra_info);
 
+/* FIXME: cagney/2003-01-07: These are just nasty.  Code shouldn't be
+   doing this.  I suspect it dates back to the days when every field
+   of an allocated structure was explicitly initialized.  */
+extern void deprecated_set_frame_next_hack (struct frame_info *fi,
+                                           struct frame_info *next);
+extern void deprecated_set_frame_prev_hack (struct frame_info *fi,
+                                           struct frame_info *prev);
+
 #endif /* !defined (FRAME_H)  */
index a0a78d0c5de49bb86fa676b38a8c5a70e2846b92..6f05f4e854d7153eb8bf7f03378c11764b518ff0 100644 (file)
@@ -296,8 +296,8 @@ analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame)
       deprecated_set_frame_extra_info_hack (dummy, extra_info);
     }
 
-  dummy->next = NULL;
-  dummy->prev = NULL;
+  deprecated_set_frame_next_hack (dummy, NULL);
+  deprecated_set_frame_prev_hack (dummy, NULL);
   deprecated_update_frame_pc_hack (dummy, pc);
   deprecated_update_frame_base_hack (dummy, frame);
   dummy->extra_info->status = 0;
index 185a48337e4666963909fc93bb6b51432514b873..f185fdffb4774aa9d5d49cf8482747903564d888 100644 (file)
@@ -159,8 +159,8 @@ analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame)
       extra_info = XMALLOC (struct frame_extra_info);
       deprecated_set_frame_extra_info_hack (dummy, extra_info);
     }
-  dummy->next = NULL;
-  dummy->prev = NULL;
+  deprecated_set_frame_next_hack (dummy, NULL);
+  deprecated_set_frame_prev_hack (dummy, NULL);
   deprecated_update_frame_pc_hack (dummy, pc);
   deprecated_update_frame_base_hack (dummy, frame);
   dummy->extra_info->status = 0;