2003-04-12 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Sat, 12 Apr 2003 17:48:55 +0000 (17:48 +0000)
committerAndrew Cagney <cagney@redhat.com>
Sat, 12 Apr 2003 17:48:55 +0000 (17:48 +0000)
* gdbthread.h (save_infrun_state): Delete parameter
"prev_func_start".
(struct thread_info): Delete field "prev_func_start".
(load_infrun_state): Ditto.
* thread.c (load_infrun_state, save_infrun_state): Update.
* infrun.c (prev_func_start): Delete variable.
(context_switch, init_wait_for_inferior): Update.
(stop_stepping, keep_going): Update.

gdb/ChangeLog
gdb/gdbthread.h
gdb/infrun.c
gdb/thread.c

index ea88538658443a5d53f186d5922726a58cdc7d8b..995730812eea3c89b7fd438b6f14261c664fb515 100644 (file)
@@ -1,3 +1,14 @@
+2003-04-12  Andrew Cagney  <cagney@redhat.com>
+
+       * gdbthread.h (save_infrun_state): Delete parameter
+       "prev_func_start".
+       (struct thread_info): Delete field "prev_func_start".
+       (load_infrun_state): Ditto.
+       * thread.c (load_infrun_state, save_infrun_state): Update.
+       * infrun.c (prev_func_start): Delete variable.
+       (context_switch, init_wait_for_inferior): Update.
+       (stop_stepping, keep_going): Update.
+
 2003-04-12  Andrew Cagney  <cagney@redhat.com>
 
        * gdbarch.sh: Add missing opaque declarations.
index aad98145c221246eb47da55a05ce3f0fa69848e1..f336d91f48d4e01b427bfb44dbbed41986ecca23 100644 (file)
@@ -44,7 +44,6 @@ struct thread_info
   int num;                     /* Convenient handle (GDB thread id) */
   /* State from wait_for_inferior */
   CORE_ADDR prev_pc;
-  CORE_ADDR prev_func_start;
   char *prev_func_name;
   struct breakpoint *step_resume_breakpoint;
   struct breakpoint *through_sigtramp_breakpoint;
@@ -118,7 +117,6 @@ extern struct thread_info *iterate_over_threads (thread_callback_func, void *);
 /* infrun context switch: save the debugger state for the given thread.  */
 extern void save_infrun_state (ptid_t ptid,
                               CORE_ADDR prev_pc,
-                              CORE_ADDR prev_func_start,
                               char     *prev_func_name,
                               int       trap_expected,
                               struct breakpoint *step_resume_breakpoint,
@@ -139,7 +137,6 @@ extern void save_infrun_state (ptid_t ptid,
    for the given thread.  */
 extern void load_infrun_state (ptid_t ptid,
                               CORE_ADDR *prev_pc,
-                              CORE_ADDR *prev_func_start,
                               char     **prev_func_name,
                               int       *trap_expected,
                               struct breakpoint **step_resume_breakpoint,
index 35e002d9e50f272beeef464dd8a96c1f663672dc..9503b106faf73ed348b2d4546fd6752344dca60d 100644 (file)
@@ -791,7 +791,6 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
    to be preserved over calls to it and cleared when the inferior
    is started.  */
 static CORE_ADDR prev_pc;
-static CORE_ADDR prev_func_start;
 static char *prev_func_name;
 \f
 
@@ -830,7 +829,6 @@ init_wait_for_inferior (void)
 {
   /* These are meaningless until the first time through wait_for_inferior.  */
   prev_pc = 0;
-  prev_func_start = 0;
   prev_func_name = NULL;
 
 #ifdef HP_OS_BUG
@@ -1118,8 +1116,7 @@ context_switch (struct execution_control_state *ecs)
   if (in_thread_list (inferior_ptid) && in_thread_list (ecs->ptid))
     {                          /* Perform infrun state context switch: */
       /* Save infrun state for the old thread.  */
-      save_infrun_state (inferior_ptid, prev_pc,
-                        prev_func_start, prev_func_name,
+      save_infrun_state (inferior_ptid, prev_pc, prev_func_name,
                         trap_expected, step_resume_breakpoint,
                         through_sigtramp_breakpoint, step_range_start,
                         step_range_end, &step_frame_id,
@@ -1130,8 +1127,7 @@ context_switch (struct execution_control_state *ecs)
                         ecs->current_line, ecs->current_symtab, step_sp);
 
       /* Load infrun state for the new thread.  */
-      load_infrun_state (ecs->ptid, &prev_pc,
-                        &prev_func_start, &prev_func_name,
+      load_infrun_state (ecs->ptid, &prev_pc, &prev_func_name,
                         &trap_expected, &step_resume_breakpoint,
                         &through_sigtramp_breakpoint, &step_range_start,
                         &step_range_end, &step_frame_id,
@@ -2737,7 +2733,6 @@ stop_stepping (struct execution_control_state *ecs)
          time, just like we did above if we didn't break out of the
          loop.  */
       prev_pc = read_pc ();
-      prev_func_start = ecs->stop_func_start;
       prev_func_name = ecs->stop_func_name;
     }
 
@@ -2754,11 +2749,6 @@ keep_going (struct execution_control_state *ecs)
 {
   /* Save the pc before execution, to compare with pc after stop.  */
   prev_pc = read_pc ();                /* Might have been DECR_AFTER_BREAK */
-  prev_func_start = ecs->stop_func_start;      /* Ok, since if DECR_PC_AFTER
-                                                  BREAK is defined, the
-                                                  original pc would not have
-                                                  been at the start of a
-                                                  function. */
   prev_func_name = ecs->stop_func_name;
 
   if (ecs->update_step_sp)
index 1b6d872050eb19858185377f4d6a1500dbc75ffc..53a2d4f49f4b17b317ecf6da99a6f3516b56d09c 100644 (file)
@@ -292,7 +292,6 @@ gdb_list_thread_ids (struct ui_out *uiout)
 void
 load_infrun_state (ptid_t ptid,
                   CORE_ADDR *prev_pc,
-                  CORE_ADDR *prev_func_start,
                   char **prev_func_name,
                   int *trap_expected,
                   struct breakpoint **step_resume_breakpoint,
@@ -317,7 +316,6 @@ load_infrun_state (ptid_t ptid,
     return;
 
   *prev_pc = tp->prev_pc;
-  *prev_func_start = tp->prev_func_start;
   *prev_func_name = tp->prev_func_name;
   *trap_expected = tp->trap_expected;
   *step_resume_breakpoint = tp->step_resume_breakpoint;
@@ -342,7 +340,6 @@ load_infrun_state (ptid_t ptid,
 void
 save_infrun_state (ptid_t ptid,
                   CORE_ADDR prev_pc,
-                  CORE_ADDR prev_func_start,
                   char *prev_func_name,
                   int trap_expected,
                   struct breakpoint *step_resume_breakpoint,
@@ -367,7 +364,6 @@ save_infrun_state (ptid_t ptid,
     return;
 
   tp->prev_pc = prev_pc;
-  tp->prev_func_start = prev_func_start;
   tp->prev_func_name = prev_func_name;
   tp->trap_expected = trap_expected;
   tp->step_resume_breakpoint = step_resume_breakpoint;