Port to GDB-6.8pre.
-Index: gdb-7.1.90.20100711/gdb/inferior.h
+Index: gdb-7.2.50.20110117/gdb/inferior.h
===================================================================
---- gdb-7.1.90.20100711.orig/gdb/inferior.h 2010-07-12 10:00:56.000000000 +0200
-+++ gdb-7.1.90.20100711/gdb/inferior.h 2010-07-12 10:04:25.000000000 +0200
-@@ -198,7 +198,15 @@ extern void reopen_exec_file (void);
+--- gdb-7.2.50.20110117.orig/gdb/inferior.h 2011-01-09 04:08:56.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/inferior.h 2011-01-17 15:48:39.000000000 +0100
+@@ -186,7 +186,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-7.1.90.20100711/gdb/infrun.c
+Index: gdb-7.2.50.20110117/gdb/infrun.c
===================================================================
---- gdb-7.1.90.20100711.orig/gdb/infrun.c 2010-07-12 10:00:56.000000000 +0200
-+++ gdb-7.1.90.20100711/gdb/infrun.c 2010-07-12 10:05:26.000000000 +0200
+--- gdb-7.2.50.20110117.orig/gdb/infrun.c 2011-01-09 04:08:56.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/infrun.c 2011-01-17 15:49:40.000000000 +0100
@@ -76,7 +76,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_or_nexting_callback (struct thread_info *tp,
void *data);
-@@ -1549,7 +1549,7 @@ maybe_software_singlestep (struct gdbarc
+@@ -1577,7 +1577,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);
-@@ -1562,10 +1562,12 @@ resume (int step, enum target_signal sig
- QUIT;
+@@ -1609,10 +1609,12 @@ resume (int step, enum target_signal sig
+ }
if (debug_infrun)
- fprintf_unfiltered (gdb_stdlog,
- "infrun: resume (step=%d, signal=%d), "
- "trap_expected=%d\n",
-- step, sig, tp->trap_expected);
+- step, sig, tp->control.trap_expected);
+ fprintf_unfiltered (gdb_stdlog, "infrun: resume (step=%s, signal=%d), "
+ "trap_expected=%d\n",
+ (step == RESUME_STEP_CONTINUE ? "RESUME_STEP_CONTINUE"
+ : (step == RESUME_STEP_USER ? "RESUME_STEP_USER"
+ : "RESUME_STEP_NEEDED")),
-+ sig, tp->trap_expected);
++ sig, tp->control.trap_expected);
/* Normally, by the time we reach `resume', the breakpoints are either
removed or inserted, as appropriate. The exception is if we're sitting
-@@ -1678,9 +1680,10 @@ a command like `return' or `jump' to con
+@@ -1730,9 +1732,10 @@ a command like `return' or `jump' to con
individually. */
resume_ptid = inferior_ptid;
}
+ && (step == RESUME_STEP_USER
+ || singlestep_breakpoints_inserted_p)))
{
- /* User-settable 'scheduler' mode requires solo thread resume. */
+ /* User-settable 'scheduler' mode requires solo thread resume. */
resume_ptid = inferior_ptid;
-@@ -1889,7 +1892,7 @@ proceed (CORE_ADDR addr, enum target_sig
+@@ -1941,7 +1944,7 @@ proceed (CORE_ADDR addr, enum target_sig
struct thread_info *tp;
CORE_ADDR pc;
struct address_space *aspace;
/* If we're stopped at a fork/vfork, follow the branch set by the
"set follow-fork-mode" command; otherwise, we'll just proceed
-@@ -1924,13 +1927,13 @@ proceed (CORE_ADDR addr, enum target_sig
+@@ -1976,13 +1979,13 @@ proceed (CORE_ADDR addr, enum target_sig
actually be executing the breakpoint insn anyway.
We'll be (un-)executing the previous instruction. */
}
else
{
-@@ -1971,13 +1974,13 @@ proceed (CORE_ADDR addr, enum target_sig
+@@ -2023,13 +2026,13 @@ proceed (CORE_ADDR addr, enum target_sig
is required it returns TRUE and sets the current thread to
- the old thread. */
+ the old thread. */
if (prepare_to_proceed (step))
- oneproc = 1;
+ resume_step = RESUME_STEP_USER;
- if (oneproc)
+ if (resume_step == RESUME_STEP_USER)
{
- tp->trap_expected = 1;
+ tp->control.trap_expected = 1;
/* If displaced stepping is enabled, we can step over the
-@@ -2064,8 +2067,13 @@ proceed (CORE_ADDR addr, enum target_sig
+@@ -2116,8 +2119,13 @@ proceed (CORE_ADDR addr, enum target_sig
/* Reset to normal state. */
init_infwait_state ();
+ resume_step = RESUME_STEP_NEEDED;
+
/* Resume inferior. */
-- resume (oneproc || step || bpstat_should_step (), tp->stop_signal);
-+ resume (resume_step, tp->stop_signal);
+- resume (oneproc || step || bpstat_should_step (), tp->suspend.stop_signal);
++ resume (resume_step, tp->suspend.stop_signal);
/* Wait for it to stop (if not standalone)
and in any case decode why it stopped, and act accordingly. */
-@@ -4903,13 +4911,18 @@ infrun: not switching back to stepped th
+@@ -4957,14 +4965,19 @@ process_event_stop_test:
/* Is thread TP in the middle of single-stepping? */
+static enum resume_step
currently_stepping (struct thread_info *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
+- return ((tp->control.step_range_end
+- && tp->control.step_resume_breakpoint == NULL)
+- || tp->control.trap_expected
+- || tp->stepping_through_solib_after_catch
+- || bpstat_should_step ());
++ if ((tp->control.step_range_end
++ && tp->control.step_resume_breakpoint == NULL)
++ || tp->control.trap_expected
+ || tp->stepping_through_solib_after_catch)
+ return RESUME_STEP_USER;
+
}
/* Returns true if any thread *but* the one passed in "data" is in the
-Index: gdb-7.1.90.20100711/gdb/linux-nat.c
+Index: gdb-7.2.50.20110117/gdb/linux-nat.c
===================================================================
---- gdb-7.1.90.20100711.orig/gdb/linux-nat.c 2010-07-12 10:00:56.000000000 +0200
-+++ gdb-7.1.90.20100711/gdb/linux-nat.c 2010-07-12 10:04:25.000000000 +0200
-@@ -2827,7 +2827,10 @@ count_events_callback (struct lwp_info *
+--- gdb-7.2.50.20110117.orig/gdb/linux-nat.c 2011-01-17 15:47:37.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/linux-nat.c 2011-01-17 15:48:39.000000000 +0100
+@@ -2928,7 +2928,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-7.1.90.20100711/gdb/linux-nat.h
+Index: gdb-7.2.50.20110117/gdb/linux-nat.h
===================================================================
---- gdb-7.1.90.20100711.orig/gdb/linux-nat.h 2010-06-11 14:10:12.000000000 +0200
-+++ gdb-7.1.90.20100711/gdb/linux-nat.h 2010-07-12 10:04:25.000000000 +0200
+--- gdb-7.2.50.20110117.orig/gdb/linux-nat.h 2011-01-17 15:47:37.000000000 +0100
++++ gdb-7.2.50.20110117/gdb/linux-nat.h 2011-01-17 15:48:39.000000000 +0100
@@ -55,8 +55,8 @@ struct lwp_info
/* If non-zero, a pending wait status. */
int status;