* infrun.c (normal_stop): Don't call
authorPedro Alves <palves@redhat.com>
Sat, 24 Jan 2009 19:17:24 +0000 (19:17 +0000)
committerPedro Alves <palves@redhat.com>
Sat, 24 Jan 2009 19:17:24 +0000 (19:17 +0000)
deprecated_update_frame_pc_hack.
* frame.c (deprecated_update_frame_pc_hack)
(deprecated_update_frame_base_hack): Delete, and ...
(create_new_frame): ... inline here.
* frame.h (deprecated_update_frame_pc_hack)
(deprecated_update_frame_base_hack): Delete declarations.

gdb/ChangeLog
gdb/frame.c
gdb/frame.h
gdb/infrun.c

index e85963d6db257b7d7c60d81b91ae5c25c9553903..84e00cef9144006fabde732391429ac2f3d5d596 100644 (file)
@@ -1,3 +1,13 @@
+2009-01-24  Pedro Alves  <pedro@codesourcery.com>
+
+       * infrun.c (normal_stop): Don't call
+       deprecated_update_frame_pc_hack.
+       * frame.c (deprecated_update_frame_pc_hack)
+       (deprecated_update_frame_base_hack): Delete, and ...
+       (create_new_frame): ... inline here.
+       * frame.h (deprecated_update_frame_pc_hack)
+       (deprecated_update_frame_base_hack): Delete declarations.
+
 2009-01-23  Pedro Alves  <pedro@codesourcery.com>
 
        * cli/cli-decode.c (add_setshow_zuinteger_cmd): New.
index f13813367afd64a54104ac37d2cbd5a51556a911..7afb70f98210d6225f862b918a2014c07913300c 100644 (file)
@@ -1111,8 +1111,12 @@ create_new_frame (CORE_ADDR addr, CORE_ADDR pc)
   fi->unwind = frame_unwind_find_by_frame (fi, &fi->prologue_cache);
 
   fi->this_id.p = 1;
-  deprecated_update_frame_base_hack (fi, addr);
-  deprecated_update_frame_pc_hack (fi, pc);
+  fi->this_id.value.stack_addr = addr;
+  /* While we're at it, update this frame's cached PC value, found
+     in the next frame.  Oh for the day when "struct frame_info"
+     is opaque and this hack on hack can just go away.  */
+  fi->next->prev_pc.value = pc;
+  fi->next->prev_pc.p = 1;
 
   if (frame_debug)
     {
@@ -1730,38 +1734,6 @@ get_frame_type (struct frame_info *frame)
   return frame->unwind->type;
 }
 
-void
-deprecated_update_frame_pc_hack (struct frame_info *frame, CORE_ADDR pc)
-{
-  if (frame_debug)
-    fprintf_unfiltered (gdb_stdlog,
-                       "{ deprecated_update_frame_pc_hack (frame=%d,pc=0x%s) }\n",
-                       frame->level, paddr_nz (pc));
-  /* NOTE: cagney/2003-03-11: Some architectures (e.g., Arm) are
-     maintaining a locally allocated frame object.  Since such frames
-     are not in the frame chain, it isn't possible to assume that the
-     frame has a next.  Sigh.  */
-  if (frame->next != NULL)
-    {
-      /* While we're at it, update this frame's cached PC value, found
-        in the next frame.  Oh for the day when "struct frame_info"
-        is opaque and this hack on hack can just go away.  */
-      frame->next->prev_pc.value = pc;
-      frame->next->prev_pc.p = 1;
-    }
-}
-
-void
-deprecated_update_frame_base_hack (struct frame_info *frame, CORE_ADDR base)
-{
-  if (frame_debug)
-    fprintf_unfiltered (gdb_stdlog,
-                       "{ deprecated_update_frame_base_hack (frame=%d,base=0x%s) }\n",
-                       frame->level, paddr_nz (base));
-  /* See comment in "frame.h".  */
-  frame->this_id.value.stack_addr = base;
-}
-
 /* Memory access methods.  */
 
 void
index 2e1ee536d18a48f0308ed9e0d868aeca02a974fc..b25ab9cc053337415fd6a4ee5e757258c8fdeca2 100644 (file)
@@ -660,22 +660,4 @@ extern struct frame_info *deprecated_safe_get_selected_frame (void);
 
 extern struct frame_info *create_new_frame (CORE_ADDR base, CORE_ADDR pc);
 
-/* FIXME: cagney/2002-12-06: Has the PC in the current frame changed?
-   "infrun.c", Thanks to gdbarch_decr_pc_after_break, can change the PC after
-   the initial frame create.  This puts things back in sync.
-
-   This replaced: frame->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, was that initial guess at the frame's base as returned
-   by the deleted 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.
-
-   This replaced: frame->frame = ....; */
-extern void deprecated_update_frame_base_hack (struct frame_info *frame,
-                                              CORE_ADDR base);
-
 #endif /* !defined (FRAME_H)  */
index c11c71a263a818f94b66e0e21c8b089d394f153b..2b74beb6049d5cbe8fa318be61559d98326a0bf9 100644 (file)
@@ -4224,17 +4224,6 @@ normal_stop (void)
       previous_inferior_ptid = inferior_ptid;
     }
 
-  /* NOTE drow/2004-01-17: Is this still necessary?  */
-  /* Make sure that the current_frame's pc is correct.  This
-     is a correction for setting up the frame info before doing
-     gdbarch_decr_pc_after_break */
-  if (target_has_execution)
-    /* FIXME: cagney/2002-12-06: Has the PC changed?  Thanks to
-       gdbarch_decr_pc_after_break, the program counter can change.  Ask the
-       frame code to check for this and sort out any resultant mess.
-       gdbarch_decr_pc_after_break needs to just go away.  */
-    deprecated_update_frame_pc_hack (get_current_frame (), read_pc ());
-
   if (!breakpoints_always_inserted_mode () && target_has_execution)
     {
       if (remove_breakpoints ())