Port to GDB-6.8pre.
-Index: gdb-6.8.50.20081209/gdb/inferior.h
+Index: gdb-6.8.50.20090803/gdb/inferior.h
===================================================================
---- gdb-6.8.50.20081209.orig/gdb/inferior.h 2008-11-20 01:35:23.000000000 +0100
-+++ gdb-6.8.50.20081209/gdb/inferior.h 2008-12-10 01:22:23.000000000 +0100
-@@ -168,7 +168,15 @@ extern void reopen_exec_file (void);
+--- gdb-6.8.50.20090803.orig/gdb/inferior.h 2009-06-28 02:20:22.000000000 +0200
++++ gdb-6.8.50.20090803/gdb/inferior.h 2009-08-03 17:19:56.000000000 +0200
+@@ -181,7 +181,15 @@ extern void reopen_exec_file (void);
/* The `resume' routine should only be called in special circumstances.
Normally, use `proceed', which handles a lot of bookkeeping. */
/* From misc files */
-Index: gdb-6.8.50.20081209/gdb/infrun.c
+Index: gdb-6.8.50.20090803/gdb/infrun.c
===================================================================
---- gdb-6.8.50.20081209.orig/gdb/infrun.c 2008-12-02 20:20:23.000000000 +0100
-+++ gdb-6.8.50.20081209/gdb/infrun.c 2008-12-10 01:23:46.000000000 +0100
-@@ -73,7 +73,7 @@ static int follow_fork (void);
+--- gdb-6.8.50.20090803.orig/gdb/infrun.c 2009-07-31 01:01:27.000000000 +0200
++++ gdb-6.8.50.20090803/gdb/infrun.c 2009-08-03 21:39:28.000000000 +0200
+@@ -74,7 +74,7 @@ static int follow_fork (void);
static void set_schedlock_func (char *args, int from_tty,
struct cmd_list_element *c);
-static int currently_stepping (struct thread_info *tp);
+static enum resume_step currently_stepping (struct thread_info *tp);
- static int currently_stepping_callback (struct thread_info *tp, void *data);
-
-@@ -961,7 +961,7 @@ set_schedlock_func (char *args, int from
+ static int currently_stepping_or_nexting_callback (struct thread_info *tp,
+ void *data);
+@@ -1137,7 +1137,7 @@ maybe_software_singlestep (struct gdbarc
STEP nonzero if we should step (zero to continue instead).
SIG is the signal to give the inferior (zero for none). */
void
{
int should_resume = 1;
struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
-@@ -975,10 +975,12 @@ resume (int step, enum target_signal sig
+@@ -1149,10 +1149,12 @@ resume (int step, enum target_signal sig
QUIT;
if (debug_infrun)
/* Some targets (e.g. Solaris x86) have a kernel bug when stepping
over an instruction that causes a page fault without triggering
-@@ -1127,9 +1129,10 @@ a command like `return' or `jump' to con
+@@ -1271,9 +1273,10 @@ a command like `return' or `jump' to con
individually. */
resume_ptid = inferior_ptid;
}
{
/* User-settable 'scheduler' mode requires solo thread resume. */
resume_ptid = inferior_ptid;
-@@ -1302,7 +1305,7 @@ proceed (CORE_ADDR addr, enum target_sig
- struct gdbarch *gdbarch = get_regcache_arch (regcache);
+@@ -1474,7 +1477,7 @@ proceed (CORE_ADDR addr, enum target_sig
+ struct gdbarch *gdbarch;
struct thread_info *tp;
- CORE_ADDR pc = regcache_read_pc (regcache);
+ CORE_ADDR pc;
- int oneproc = 0;
+ enum resume_step resume_step = RESUME_STEP_CONTINUE;
- if (step > 0)
- step_start_function = find_pc_function (pc);
-@@ -1322,13 +1325,13 @@ proceed (CORE_ADDR addr, enum target_sig
+ /* If we're stopped at a fork/vfork, follow the branch set by the
+ "set follow-fork-mode" command; otherwise, we'll just proceed
+@@ -1508,13 +1511,13 @@ proceed (CORE_ADDR addr, enum target_sig
actually be executing the breakpoint insn anyway.
We'll be (un-)executing the previous instruction. */
}
else
{
-@@ -1359,13 +1362,13 @@ proceed (CORE_ADDR addr, enum target_sig
+@@ -1545,13 +1548,13 @@ proceed (CORE_ADDR addr, enum target_sig
is required it returns TRUE and sets the current thread to
the old thread. */
if (prepare_to_proceed (step))
{
tp->trap_expected = 1;
/* If displaced stepping is enabled, we can step over the
-@@ -1451,8 +1454,13 @@ proceed (CORE_ADDR addr, enum target_sig
+@@ -1637,8 +1640,13 @@ proceed (CORE_ADDR addr, enum target_sig
/* Reset to normal state. */
init_infwait_state ();
/* Wait for it to stop (if not standalone)
and in any case decode why it stopped, and act accordingly. */
-@@ -3690,10 +3698,16 @@ currently_stepping_callback (struct thre
- return tp != data && currently_stepping_thread (tp);
- }
+@@ -4171,13 +4179,18 @@ infrun: not switching back to stepped th
+
+ /* Is thread TP in the middle of single-stepping? */
-static int
+static enum resume_step
currently_stepping (struct thread_info *tp)
{
-- return currently_stepping_thread (tp) || bpstat_should_step ();
-+ if (currently_stepping_thread (tp))
+- return ((tp->step_range_end && tp->step_resume_breakpoint == NULL)
+- || tp->trap_expected
+- || tp->stepping_through_solib_after_catch
+- || bpstat_should_step ());
++ if ((tp->step_range_end && tp->step_resume_breakpoint == NULL)
++ || tp->trap_expected
++ || tp->stepping_through_solib_after_catch)
+ return RESUME_STEP_USER;
+
+ if (bpstat_should_step ())
+ return RESUME_STEP_CONTINUE;
}
- /* Inferior has stepped into a subroutine call with source code that
-Index: gdb-6.8.50.20081209/gdb/linux-nat.c
+ /* Returns true if any thread *but* the one passed in "data" is in the
+Index: gdb-6.8.50.20090803/gdb/linux-nat.c
===================================================================
---- gdb-6.8.50.20081209.orig/gdb/linux-nat.c 2008-12-02 08:57:36.000000000 +0100
-+++ gdb-6.8.50.20081209/gdb/linux-nat.c 2008-12-10 01:22:23.000000000 +0100
-@@ -2343,7 +2343,10 @@ count_events_callback (struct lwp_info *
+--- gdb-6.8.50.20090803.orig/gdb/linux-nat.c 2009-07-31 17:25:21.000000000 +0200
++++ gdb-6.8.50.20090803/gdb/linux-nat.c 2009-08-03 21:39:10.000000000 +0200
+@@ -2351,7 +2351,10 @@ count_events_callback (struct lwp_info *
static int
select_singlestep_lwp_callback (struct lwp_info *lp, void *data)
{
return 1;
else
return 0;
-Index: gdb-6.8.50.20081209/gdb/linux-nat.h
+Index: gdb-6.8.50.20090803/gdb/linux-nat.h
===================================================================
---- gdb-6.8.50.20081209.orig/gdb/linux-nat.h 2008-07-27 23:12:40.000000000 +0200
-+++ gdb-6.8.50.20081209/gdb/linux-nat.h 2008-12-10 01:22:23.000000000 +0100
+--- gdb-6.8.50.20090803.orig/gdb/linux-nat.h 2009-05-18 19:11:25.000000000 +0200
++++ gdb-6.8.50.20090803/gdb/linux-nat.h 2009-08-03 21:39:09.000000000 +0200
@@ -55,8 +55,8 @@ struct lwp_info
/* If non-zero, a pending wait status. */
int status;