aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-01-07 19:19:00 +0000
committerAndrew Cagney <cagney@redhat.com>2003-01-07 19:19:00 +0000
commit483d36b217bc77e99344ece84a7e70c1b3950f0e (patch)
tree44a045855d90b1cd1cf1ca4919ffc9d99e487353 /gdb
parent2003-01-07 David Carlton <carlton@math.stanford.edu> (diff)
downloadbinutils-gdb-483d36b217bc77e99344ece84a7e70c1b3950f0e.tar.gz
binutils-gdb-483d36b217bc77e99344ece84a7e70c1b3950f0e.tar.bz2
binutils-gdb-483d36b217bc77e99344ece84a7e70c1b3950f0e.zip
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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/frame.c14
-rw-r--r--gdb/frame.h8
-rw-r--r--gdb/mcore-tdep.c4
-rw-r--r--gdb/mn10300-tdep.c4
5 files changed, 36 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b042cbb0a28..611d249b2d1 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/frame.c b/gdb/frame.c
index 443f06705c6..f09a47b4268 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -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)
{
diff --git a/gdb/frame.h b/gdb/frame.h
index f593d00f1c7..2f50eebd878 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -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) */
diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c
index a0a78d0c5de..6f05f4e854d 100644
--- a/gdb/mcore-tdep.c
+++ b/gdb/mcore-tdep.c
@@ -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;
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index 185a48337e4..f185fdffb47 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -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;