summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-12-18 18:03:42 +0000
committerAndrew Cagney <cagney@redhat.com>2002-12-18 18:03:42 +0000
commitaefc8bb2ff0c0a582e7ffe20046c7c9acb79704b (patch)
treea09f2c0f0cfeb50aa328aba97f1b92fa29f7fac3
parenta7f05f3fb4d57164238b0abb76a9a6858e733252 (diff)
downloadgdb-aefc8bb2ff0c0a582e7ffe20046c7c9acb79704b.tar.gz
2002-12-18 Andrew Cagney <ac131313@redhat.com>
* frame.c (deprecated_update_current_frame_pc_hack): Replace deprecated_update_current_frame_pc_hack. (deprecated_update_frame_base_hack): New function. * frame.h (deprecated_update_frame_pc_hack): Replace (deprecated_update_frame_base_hack): Declare. * infrun.c (normal_stop): Update.
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/frame.c17
-rw-r--r--gdb/frame.h11
-rw-r--r--gdb/infrun.c2
4 files changed, 30 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index da71028d432..e65f4425f81 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,14 @@
2002-12-18 Andrew Cagney <ac131313@redhat.com>
+ * frame.c (deprecated_update_current_frame_pc_hack): Replace
+ deprecated_update_current_frame_pc_hack.
+ (deprecated_update_frame_base_hack): New function.
+ * frame.h (deprecated_update_frame_pc_hack): Replace
+ (deprecated_update_frame_base_hack): Declare.
+ * infrun.c (normal_stop): Update.
+
+2002-12-18 Andrew Cagney <ac131313@redhat.com>
+
* rs6000-tdep.c (rs6000_init_extra_frame_info): Use
frame_extra_info_zalloc.
(rs6000_frame_args_address): Use get_frame_extra_info.
diff --git a/gdb/frame.c b/gdb/frame.c
index 17ee8327a67..ecdf408c5cf 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -1297,14 +1297,17 @@ frame_extra_info_zalloc (struct frame_info *fi, long size)
}
void
-deprecated_update_current_frame_pc_hack (CORE_ADDR pc)
+deprecated_update_frame_pc_hack (struct frame_info *frame, CORE_ADDR pc)
{
- /* FIXME: cagney/2002-12-06: Has the PC in the current frame
- changed? "infrun.c", Thanks to DECR_PC_AFTER_BREAK, can change
- the PC after the initial frame create. This puts things back in
- sync. */
- if (current_frame != NULL)
- current_frame->pc = pc;
+ /* See comment in "frame.h". */
+ frame->pc = pc;
+}
+
+void
+deprecated_update_frame_base_hack (struct frame_info *frame, CORE_ADDR base)
+{
+ /* See comment in "frame.h". */
+ frame->frame = base;
}
void
diff --git a/gdb/frame.h b/gdb/frame.h
index 234c281d53b..c9c56476bc4 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -663,6 +663,15 @@ extern CORE_ADDR *get_frame_saved_regs (struct frame_info *);
/* FIXME: cagney/2002-12-06: Has the PC in the current frame changed?
"infrun.c", Thanks to DECR_PC_AFTER_BREAK, can change the PC after
the initial frame create. This puts things back in sync. */
-extern void deprecated_update_current_frame_pc_hack (CORE_ADDR pc);
+extern void deprecated_update_frame_pc_hack (struct frame_info *frame,
+ CORE_ADDR pc);
+
+/* FIXME: cagney/2002-12-18: Has the frame's base changed? Or to be
+ more exact, whas that initial guess at the frame's base as returned
+ by read_fp() wrong. If it was, fix it. This shouldn't be
+ necessary since the code should be getting the frame's base correct
+ from the outset. */
+extern void deprecated_update_frame_base_hack (struct frame_info *frame,
+ CORE_ADDR base);
#endif /* !defined (FRAME_H) */
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 6a239a50e9b..aa404cfcd14 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -2985,7 +2985,7 @@ normal_stop (void)
DECR_PC_AFTER_BREAK, the program counter can change. Ask the
frame code to check for this and sort out any resultant mess.
DECR_PC_AFTER_BREAK needs to just go away. */
- deprecated_update_current_frame_pc_hack (read_pc ());
+ deprecated_update_frame_pc_hack (get_current_frame (), read_pc ());
if (target_has_execution && breakpoints_inserted)
{