+2002-12-13 Andrew Cagney <ac131313@redhat.com>
+
+ * frame.c (deprecated_update_current_frame_pc_hack): New
+ function.
+ * frame.h (deprecated_update_current_frame_pc_hack): Declare.
+ * infrun.c (normal_stop): Use said function instead of directly
+ modifying the frame's PC.
+
2002-12-13 Alexandre Oliva <aoliva@redhat.com>
* frame.h (frame_id_unwind_ftype): Fix typo in return type.
}
void
+deprecated_update_current_frame_pc_hack (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;
+}
+
+void
_initialize_frame (void)
{
obstack_init (&frame_cache_obstack);
long size);
extern struct frame_extra_info *get_frame_extra_info (struct frame_info *fi);
+/* 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);
+
#endif /* !defined (FRAME_H) */
/* Make sure that the current_frame's pc is correct. This
is a correction for setting up the frame info before doing
DECR_PC_AFTER_BREAK */
- if (target_has_execution && get_current_frame ())
- (get_current_frame ())->pc = read_pc ();
+ if (target_has_execution)
+ /* FIXME: cagney/2002-12-06: Has the PC changed? Thanks to
+ 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 ());
if (target_has_execution && breakpoints_inserted)
{