This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFC: Really remove PREPARE_TO_PROCEED this time


This patch removes all occurances of PREPARE_TO_PROCEED except for
generic_prepare_to_proceed, which moves to a static function named
prepare_to_proceed in infrun.c.  We've been over this before; the difference
is that now the only remaining implementations were default, generic, and
lin_lwp.  I've verified that generic is a superset of lin_lwp, and a safe
replacement for default, so I think we're ready to remove the gdbarch hook.

Comments, anyone?  If not, I plan to check this in later this week based on
the previous discussions.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

2003-06-15  Daniel Jacobowitz  <drow@mvista.com>

	* arch-utils.c (default_prepare_to_proceed): Remove.
	(generic_prepare_to_proceed): Remove.
	* arch-utils.h (default_prepare_to_proceed): Remove prototype.
	(generic_prepare_to_proceed): Remove prototype.
	* gdbarch.sh (PREPARE_TO_PROCEED): Remove.
	* gdbarch.c: Regenerate.
	* gdbarch.h: Regenerate.
	* hppa-tdep.c (hppa_prepare_to_proceed): Remove dangling prototype.
	* hppah-nat.c (hppa_switched_threads): Remove.
	* infrun.c (prepare_to_proceed): New static function, copied from
	generic_prepare_to_proceed.  Remove select_it argument.
	(proceed): Call prepare_to_proceed.
	* infttrace.c (old_gdb_pid, reported_pid, reported_bpt): Remove
	variables.
	(ptrace_wait): Don't set the removed variables.
	(hppa_switched_threads): Remove.
	* lin-lwp.c (lin_lwp_prepare_to_proceed): Remove.
	* config/nm-linux.h (PREPARE_TO_PROCEED): Don't define.
	(lin_lwp_prepare_to_proceed): Remove prototype.
	* config/i386/nm-x86-64linux.h (PREPARE_TO_PROCEED): Don't undefine.
	* config/pa/nm-hppah.h (PREPARE_TO_PROCEED): Don't define.

2003-06-15  Daniel Jacobowitz  <drow@mvista.com>

	* gdbint.texinfo (Native Conditionals): Remove PREPARE_TO_PROCEED.

Index: gdb/arch-utils.c
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.c,v
retrieving revision 1.88
diff -u -p -r1.88 arch-utils.c
--- gdb/arch-utils.c	14 Jun 2003 22:35:23 -0000	1.88
+++ gdb/arch-utils.c	15 Jun 2003 19:49:56 -0000
@@ -272,66 +272,6 @@ no_op_reg_to_regnum (int reg)
   return reg;
 }
 
-/* Default prepare_to_procced().  */
-int
-default_prepare_to_proceed (int select_it)
-{
-  return 0;
-}
-
-/* Generic prepare_to_proceed().  This one should be suitable for most
-   targets that support threads. */
-int
-generic_prepare_to_proceed (int select_it)
-{
-  ptid_t wait_ptid;
-  struct target_waitstatus wait_status;
-
-  /* Get the last target status returned by target_wait().  */
-  get_last_target_status (&wait_ptid, &wait_status);
-
-  /* Make sure we were stopped either at a breakpoint, or because
-     of a Ctrl-C.  */
-  if (wait_status.kind != TARGET_WAITKIND_STOPPED
-      || (wait_status.value.sig != TARGET_SIGNAL_TRAP &&
-          wait_status.value.sig != TARGET_SIGNAL_INT))
-    {
-      return 0;
-    }
-
-  if (!ptid_equal (wait_ptid, minus_one_ptid)
-      && !ptid_equal (inferior_ptid, wait_ptid))
-    {
-      /* Switched over from WAIT_PID.  */
-      CORE_ADDR wait_pc = read_pc_pid (wait_ptid);
-
-      if (wait_pc != read_pc ())
-	{
-	  if (select_it)
-	    {
-	      /* Switch back to WAIT_PID thread.  */
-	      inferior_ptid = wait_ptid;
-
-	      /* FIXME: This stuff came from switch_to_thread() in
-		 thread.c (which should probably be a public function).  */
-	      flush_cached_frames ();
-	      registers_changed ();
-	      stop_pc = wait_pc;
-	      select_frame (get_current_frame ());
-	    }
-          /* We return 1 to indicate that there is a breakpoint here,
-             so we need to step over it before continuing to avoid
-             hitting it straight away. */
-          if (breakpoint_here_p (wait_pc))
-            {
-	      return 1;
-            }
-	}
-    }
-  return 0;
-  
-}
-
 CORE_ADDR
 init_frame_pc_noop (int fromleaf, struct frame_info *prev)
 {
Index: gdb/arch-utils.h
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.h,v
retrieving revision 1.50
diff -u -p -r1.50 arch-utils.h
--- gdb/arch-utils.h	14 Jun 2003 22:35:23 -0000	1.50
+++ gdb/arch-utils.h	15 Jun 2003 19:49:56 -0000
@@ -105,12 +105,6 @@ extern CORE_ADDR core_addr_identity (COR
 
 extern int no_op_reg_to_regnum (int reg);
 
-/* Default prepare_to_procced. */
-
-extern int default_prepare_to_proceed (int select_it);
-
-extern int generic_prepare_to_proceed (int select_it);
-
 /* Versions of init_frame_pc().  Do nothing; do the default. */
 
 extern CORE_ADDR init_frame_pc_noop (int fromleaf, struct frame_info *prev);
Index: gdb/gdbarch.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.c,v
retrieving revision 1.228
diff -u -p -r1.228 gdbarch.c
--- gdb/gdbarch.c	14 Jun 2003 22:35:24 -0000	1.228
+++ gdb/gdbarch.c	15 Jun 2003 19:49:57 -0000
@@ -237,7 +237,6 @@ struct gdbarch
   gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
   gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
   CORE_ADDR decr_pc_after_break;
-  gdbarch_prepare_to_proceed_ftype *prepare_to_proceed;
   CORE_ADDR function_start_offset;
   gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
   CORE_ADDR frame_args_skip;
@@ -405,7 +404,6 @@ struct gdbarch startup_gdbarch =
   0,  /* memory_insert_breakpoint */
   0,  /* memory_remove_breakpoint */
   0,  /* decr_pc_after_break */
-  0,  /* prepare_to_proceed */
   0,  /* function_start_offset */
   generic_remote_translate_xfer_address,  /* remote_translate_xfer_address */
   0,  /* frame_args_skip */
@@ -545,7 +543,6 @@ gdbarch_alloc (const struct gdbarch_info
   current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
   current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
   current_gdbarch->decr_pc_after_break = -1;
-  current_gdbarch->prepare_to_proceed = default_prepare_to_proceed;
   current_gdbarch->function_start_offset = -1;
   current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
   current_gdbarch->frame_args_skip = -1;
@@ -713,7 +710,6 @@ verify_gdbarch (struct gdbarch *gdbarch)
   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
       && (gdbarch->decr_pc_after_break == -1))
     fprintf_unfiltered (log, "\n\tdecr_pc_after_break");
-  /* Skip verify of prepare_to_proceed, invalid_p == 0 */
   if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
       && (gdbarch->function_start_offset == -1))
     fprintf_unfiltered (log, "\n\tfunction_start_offset");
@@ -2004,17 +2000,6 @@ gdbarch_dump (struct gdbarch *gdbarch, s
                         (long) current_gdbarch->pointer_to_address
                         /*POINTER_TO_ADDRESS ()*/);
 #endif
-#ifdef PREPARE_TO_PROCEED
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "PREPARE_TO_PROCEED(select_it)",
-                      XSTRING (PREPARE_TO_PROCEED (select_it)));
-  if (GDB_MULTI_ARCH)
-    fprintf_unfiltered (file,
-                        "gdbarch_dump: PREPARE_TO_PROCEED = <0x%08lx>\n",
-                        (long) current_gdbarch->prepare_to_proceed
-                        /*PREPARE_TO_PROCEED ()*/);
-#endif
   if (GDB_MULTI_ARCH)
     fprintf_unfiltered (file,
                         "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
@@ -4856,25 +4841,6 @@ set_gdbarch_decr_pc_after_break (struct 
                                  CORE_ADDR decr_pc_after_break)
 {
   gdbarch->decr_pc_after_break = decr_pc_after_break;
-}
-
-int
-gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it)
-{
-  gdb_assert (gdbarch != NULL);
-  if (gdbarch->prepare_to_proceed == 0)
-    internal_error (__FILE__, __LINE__,
-                    "gdbarch: gdbarch_prepare_to_proceed invalid");
-  if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n");
-  return gdbarch->prepare_to_proceed (select_it);
-}
-
-void
-set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch,
-                                gdbarch_prepare_to_proceed_ftype prepare_to_proceed)
-{
-  gdbarch->prepare_to_proceed = prepare_to_proceed;
 }
 
 CORE_ADDR
Index: gdb/gdbarch.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.h,v
retrieving revision 1.197
diff -u -p -r1.197 gdbarch.h
--- gdb/gdbarch.h	14 Jun 2003 22:35:24 -0000	1.197
+++ gdb/gdbarch.h	15 Jun 2003 19:49:57 -0000
@@ -2172,21 +2172,6 @@ extern void set_gdbarch_decr_pc_after_br
 #define DECR_PC_AFTER_BREAK (gdbarch_decr_pc_after_break (current_gdbarch))
 #endif
 
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (PREPARE_TO_PROCEED)
-#define PREPARE_TO_PROCEED(select_it) (default_prepare_to_proceed (select_it))
-#endif
-
-typedef int (gdbarch_prepare_to_proceed_ftype) (int select_it);
-extern int gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it);
-extern void set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, gdbarch_prepare_to_proceed_ftype *prepare_to_proceed);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (PREPARE_TO_PROCEED)
-#error "Non multi-arch definition of PREPARE_TO_PROCEED"
-#endif
-#if !defined (PREPARE_TO_PROCEED)
-#define PREPARE_TO_PROCEED(select_it) (gdbarch_prepare_to_proceed (current_gdbarch, select_it))
-#endif
-
 extern CORE_ADDR gdbarch_function_start_offset (struct gdbarch *gdbarch);
 extern void set_gdbarch_function_start_offset (struct gdbarch *gdbarch, CORE_ADDR function_start_offset);
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FUNCTION_START_OFFSET)
Index: gdb/gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.250
diff -u -p -r1.250 gdbarch.sh
--- gdb/gdbarch.sh	14 Jun 2003 22:35:25 -0000	1.250
+++ gdb/gdbarch.sh	15 Jun 2003 19:49:58 -0000
@@ -617,7 +617,6 @@ f::BREAKPOINT_FROM_PC:const unsigned cha
 f:2:MEMORY_INSERT_BREAKPOINT:int:memory_insert_breakpoint:CORE_ADDR addr, char *contents_cache:addr, contents_cache::0:default_memory_insert_breakpoint::0
 f:2:MEMORY_REMOVE_BREAKPOINT:int:memory_remove_breakpoint:CORE_ADDR addr, char *contents_cache:addr, contents_cache::0:default_memory_remove_breakpoint::0
 v:2:DECR_PC_AFTER_BREAK:CORE_ADDR:decr_pc_after_break::::0:-1
-f:2:PREPARE_TO_PROCEED:int:prepare_to_proceed:int select_it:select_it::0:default_prepare_to_proceed::0
 v:2:FUNCTION_START_OFFSET:CORE_ADDR:function_start_offset::::0:-1
 #
 m::REMOTE_TRANSLATE_XFER_ADDRESS:void:remote_translate_xfer_address:struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len:regcache, gdb_addr, gdb_len, rem_addr, rem_len:::generic_remote_translate_xfer_address::0
Index: gdb/hppa-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-tdep.c,v
retrieving revision 1.84
diff -u -p -r1.84 hppa-tdep.c
--- gdb/hppa-tdep.c	13 Jun 2003 04:40:32 -0000	1.84
+++ gdb/hppa-tdep.c	15 Jun 2003 19:49:59 -0000
@@ -129,9 +129,6 @@ static int restore_pc_queue (CORE_ADDR *
 
 static int hppa_alignof (struct type *);
 
-/* To support multi-threading and stepping. */
-int hppa_prepare_to_proceed ();
-
 static int prologue_inst_adjust_sp (unsigned long);
 
 static int is_branch (unsigned long);
Index: gdb/hppah-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/hppah-nat.c,v
retrieving revision 1.24
diff -u -p -r1.24 hppah-nat.c
--- gdb/hppah-nat.c	8 May 2003 22:33:14 -0000	1.24
+++ gdb/hppah-nat.c	15 Jun 2003 19:49:59 -0000
@@ -930,16 +930,6 @@ hppa_pid_or_tid_to_str (ptid_t id)
   return child_pid_to_str (id);
 }
 
-/* This function has no meaning in a non-threaded world.  Thus, we
-   return 0 (FALSE).  See the use of "hppa_prepare_to_proceed" in
-   hppa-tdep.c. */
-
-pid_t
-hppa_switched_threads (pid_t pid)
-{
-  return (pid_t) 0;
-}
-
 void
 hppa_ensure_vforking_parent_remains_stopped (int pid)
 {
Index: gdb/infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.109
diff -u -p -r1.109 infrun.c
--- gdb/infrun.c	7 May 2003 18:35:57 -0000	1.109
+++ gdb/infrun.c	15 Jun 2003 19:50:00 -0000
@@ -79,6 +79,8 @@ static int currently_stepping (struct ex
 
 static void xdb_handle_command (char *args, int from_tty);
 
+static int prepare_to_proceed (void);
+
 void _initialize_infrun (void);
 
 int inferior_ignoring_startup_exec_events = 0;
@@ -667,6 +669,55 @@ clear_proceed_status (void)
   bpstat_clear (&stop_bpstat);
 }
 
+/* This should be suitable for any targets that support threads. */
+
+static int
+prepare_to_proceed (void)
+{
+  ptid_t wait_ptid;
+  struct target_waitstatus wait_status;
+
+  /* Get the last target status returned by target_wait().  */
+  get_last_target_status (&wait_ptid, &wait_status);
+
+  /* Make sure we were stopped either at a breakpoint, or because
+     of a Ctrl-C.  */
+  if (wait_status.kind != TARGET_WAITKIND_STOPPED
+      || (wait_status.value.sig != TARGET_SIGNAL_TRAP &&
+          wait_status.value.sig != TARGET_SIGNAL_INT))
+    {
+      return 0;
+    }
+
+  if (!ptid_equal (wait_ptid, minus_one_ptid)
+      && !ptid_equal (inferior_ptid, wait_ptid))
+    {
+      /* Switched over from WAIT_PID.  */
+      CORE_ADDR wait_pc = read_pc_pid (wait_ptid);
+
+      if (wait_pc != read_pc ())
+	{
+	  /* Switch back to WAIT_PID thread.  */
+	  inferior_ptid = wait_ptid;
+
+	  /* FIXME: This stuff came from switch_to_thread() in
+	     thread.c (which should probably be a public function).  */
+	  flush_cached_frames ();
+	  registers_changed ();
+	  stop_pc = wait_pc;
+	  select_frame (get_current_frame ());
+	}
+
+	/* We return 1 to indicate that there is a breakpoint here,
+	   so we need to step over it before continuing to avoid
+	   hitting it straight away. */
+	if (breakpoint_here_p (wait_pc))
+	   return 1;
+    }
+
+  return 0;
+  
+}
 
 /* Record the pc of the program the last time it stopped.  This is
    just used internally by wait_for_inferior, but need to be preserved
@@ -722,7 +773,6 @@ proceed (CORE_ADDR addr, enum target_sig
       write_pc (addr);
     }
 
-#ifdef PREPARE_TO_PROCEED
   /* In a multi-threaded task we may select another thread
      and then continue or step.
 
@@ -731,15 +781,11 @@ proceed (CORE_ADDR addr, enum target_sig
      any execution (i.e. it will report a breakpoint hit
      incorrectly).  So we must step over it first.
 
-     PREPARE_TO_PROCEED checks the current thread against the thread
+     prepare_to_proceed checks the current thread against the thread
      that reported the most recent event.  If a step-over is required
      it returns TRUE and sets the current thread to the old thread. */
-  if (PREPARE_TO_PROCEED (1) && breakpoint_here_p (read_pc ()))
-    {
-      oneproc = 1;
-    }
-
-#endif /* PREPARE_TO_PROCEED */
+  if (prepare_to_proceed () && breakpoint_here_p (read_pc ()))
+    oneproc = 1;
 
 #ifdef HP_OS_BUG
   if (trap_expected_after_continue)
Index: gdb/infttrace.c
===================================================================
RCS file: /cvs/src/src/gdb/infttrace.c,v
retrieving revision 1.27
diff -u -p -r1.27 infttrace.c
--- gdb/infttrace.c	30 Mar 2003 14:52:42 -0000	1.27
+++ gdb/infttrace.c	15 Jun 2003 19:50:01 -0000
@@ -142,12 +142,6 @@ static startup_semaphore_t startup_semap
 static int vforking_child_pid = 0;
 static int vfork_in_flight = 0;
 
-/* To support PREPARE_TO_PROCEED (hppa_prepare_to_proceed).
- */
-static pid_t old_gdb_pid = 0;
-static pid_t reported_pid = 0;
-static int reported_bpt = 0;
-
 /* 1 if ok as results of a ttrace or ttrace_wait call, 0 otherwise.
  */
 #define TT_OK( _status, _errno ) \
@@ -2912,12 +2906,6 @@ ptrace_wait (ptid_t ptid, int *status)
    */
   return_pid = map_to_gdb_tid (real_tid);
 
-  /* Remember this for later use in "hppa_prepare_to_proceed".
-   */
-  old_gdb_pid = PIDGET (inferior_ptid);
-  reported_pid = return_pid;
-  reported_bpt = ((tsp.tts_event & TTEVT_SIGNAL) && (5 == tsp.tts_u.tts_signal.tts_signo));
-
   if (real_tid == 0 || return_pid == 0)
     {
       warning ("Internal error: process-wait failed.");
@@ -5535,64 +5523,6 @@ hppa_pid_or_tid_to_str (ptid_t ptid)
   return buf;
 }
 
-
-/* If the current pid is not the pid this module reported
- * from "ptrace_wait" with the most recent event, then the
- * user has switched threads.
- *
- * If the last reported event was a breakpoint, then return
- * the old thread id, else return 0.
- */
-pid_t
-hppa_switched_threads (pid_t gdb_pid)
-{
-  if (gdb_pid == old_gdb_pid)
-    {
-      /*
-       * Core gdb is working with the same pid that it
-       * was before we reported the last event.  This
-       * is ok: e.g. we reported hitting a thread-specific
-       * breakpoint, but we were reporting the wrong
-       * thread, so the core just ignored the event.
-       *
-       * No thread switch has happened.
-       */
-      return (pid_t) 0;
-    }
-  else if (gdb_pid == reported_pid)
-    {
-      /*
-       * Core gdb is working with the pid we reported, so
-       * any continue or step will be able to figure out
-       * that it needs to step over any hit breakpoints
-       * without our (i.e. PREPARE_TO_PROCEED's) help.
-       */
-      return (pid_t) 0;
-    }
-  else if (!reported_bpt)
-    {
-      /*
-       * The core switched, but we didn't just report a
-       * breakpoint, so there's no just-hit breakpoint
-       * instruction at "reported_pid"'s PC, and thus there
-       * is no need to step over it.
-       */
-      return (pid_t) 0;
-    }
-  else
-    {
-      /* There's been a real switch, and we reported
-       * a hit breakpoint.  Let "hppa_prepare_to_proceed"
-       * know, so it can see whether the breakpoint is
-       * still active.
-       */
-      return reported_pid;
-    }
-
-  /* Keep compiler happy with an obvious return at the end.
-   */
-  return (pid_t) 0;
-}
 
 void
 hppa_ensure_vforking_parent_remains_stopped (int pid)
Index: gdb/lin-lwp.c
===================================================================
RCS file: /cvs/src/src/gdb/lin-lwp.c,v
retrieving revision 1.44
diff -u -p -r1.44 lin-lwp.c
--- gdb/lin-lwp.c	4 Jun 2003 20:51:28 -0000	1.44
+++ gdb/lin-lwp.c	15 Jun 2003 19:50:01 -0000
@@ -298,46 +298,6 @@ iterate_over_lwps (int (*callback) (stru
 }
 
 
-/* Implementation of the PREPARE_TO_PROCEED hook for the GNU/Linux LWP
-   layer.
-
-   Note that this implementation is potentially redundant now that
-   default_prepare_to_proceed() has been added.
-
-   FIXME This may not support switching threads after Ctrl-C
-   correctly. The default implementation does support this. */
-
-int
-lin_lwp_prepare_to_proceed (void)
-{
-  if (!ptid_equal (trap_ptid, null_ptid)
-      && !ptid_equal (inferior_ptid, trap_ptid))
-    {
-      /* Switched over from TRAP_PID.  */
-      CORE_ADDR stop_pc = read_pc ();
-      CORE_ADDR trap_pc;
-
-      /* Avoid switching where it wouldn't do any good, i.e. if both
-         threads are at the same breakpoint.  */
-      trap_pc = read_pc_pid (trap_ptid);
-      if (trap_pc != stop_pc && breakpoint_here_p (trap_pc))
-	{
-	  /* User hasn't deleted the breakpoint.  Return non-zero, and
-	     switch back to TRAP_PID.  */
-	  inferior_ptid = trap_ptid;
-
-	  /* FIXME: Is this stuff really necessary?  */
-	  flush_cached_frames ();
-	  registers_changed ();
-
-	  return 1;
-	}
-    }
-
-  return 0;
-}
-
-
 #if 0
 static void
 lin_lwp_open (char *args, int from_tty)
Index: gdb/config/nm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/nm-linux.h,v
retrieving revision 1.14
diff -u -p -r1.14 nm-linux.h
--- gdb/config/nm-linux.h	12 Apr 2003 17:41:26 -0000	1.14
+++ gdb/config/nm-linux.h	15 Jun 2003 19:50:01 -0000
@@ -51,9 +51,6 @@ struct target_waitstatus;
 extern ptid_t child_wait (ptid_t ptid, struct target_waitstatus *ourstatus);
 #define CHILD_WAIT
 
-extern int lin_lwp_prepare_to_proceed (void);
-#define PREPARE_TO_PROCEED(select_it) lin_lwp_prepare_to_proceed ()
-
 extern void lin_lwp_attach_lwp (ptid_t ptid, int verbose);
 #define ATTACH_LWP(ptid, verbose) lin_lwp_attach_lwp ((ptid), (verbose))
 
Index: gdb/config/i386/nm-x86-64linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/i386/nm-x86-64linux.h,v
retrieving revision 1.2
diff -u -p -r1.2 nm-x86-64linux.h
--- gdb/config/i386/nm-x86-64linux.h	31 May 2003 08:15:38 -0000	1.2
+++ gdb/config/i386/nm-x86-64linux.h	15 Jun 2003 19:50:01 -0000
@@ -60,9 +60,5 @@ extern unsigned long x86_64_linux_dr_get
 
 /* Override copies of {fetch,store}_inferior_registers in `infptrace.c'.  */
 #define FETCH_INFERIOR_REGISTERS
-
-
-/* FIXME: kettenis/20030416: Why?  */
-#undef PREPARE_TO_PROCEED
 
 #endif /* NM_X86_64_LINUX_H */
Index: gdb/config/pa/nm-hppah.h
===================================================================
RCS file: /cvs/src/src/gdb/config/pa/nm-hppah.h,v
retrieving revision 1.14
diff -u -p -r1.14 nm-hppah.h
--- gdb/config/pa/nm-hppah.h	4 Jun 2003 20:55:02 -0000	1.14
+++ gdb/config/pa/nm-hppah.h	15 Jun 2003 19:50:01 -0000
@@ -53,11 +53,6 @@
 #define CHILD_XFER_MEMORY
 #define CHILD_FOLLOW_FORK
 
-/* While this is for use by threaded programs, it doesn't appear
- * to hurt non-threaded ones.  This is used in infrun.c: */
-#define PREPARE_TO_PROCEED(select_it) generic_prepare_to_proceed(select_it)
-extern int generic_prepare_to_proceed (int select_it);
-
 /* In infptrace.c or infttrace.c: */
 #define CHILD_PID_TO_EXEC_FILE
 #define CHILD_POST_STARTUP_INFERIOR
Index: gdb/doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.151
diff -u -p -r1.151 gdbint.texinfo
--- gdb/doc/gdbint.texinfo	13 Jun 2003 18:30:38 -0000	1.151
+++ gdb/doc/gdbint.texinfo	15 Jun 2003 19:50:04 -0000
@@ -4494,23 +4494,6 @@ root directory.
 Define this to be able to, when a breakpoint insertion fails, warn the
 user that another process may be running with the same executable.
 
-@item PREPARE_TO_PROCEED (@var{select_it})
-@findex PREPARE_TO_PROCEED
-This (ugly) macro allows a native configuration to customize the way the
-@code{proceed} function in @file{infrun.c} deals with switching between
-threads.
-
-In a multi-threaded task we may select another thread and then continue
-or step.  But if the old thread was stopped at a breakpoint, it will
-immediately cause another breakpoint stop without any execution (i.e. it
-will report a breakpoint hit incorrectly).  So @value{GDBN} must step over it
-first.
-
-If defined, @code{PREPARE_TO_PROCEED} should check the current thread
-against the thread that reported the most recent event.  If a step-over
-is required, it returns TRUE.  If @var{select_it} is non-zero, it should
-reselect the old thread.
-
 @item PROC_NAME_FMT
 @findex PROC_NAME_FMT
 Defines the format for the name of a @file{/proc} device.  Should be


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]