Rebase to FSF GDB 7.4.50.20120103.

This commit is contained in:
Jan Kratochvil 2012-01-03 16:00:12 +01:00
commit 254f0e90bc
42 changed files with 5367 additions and 7935 deletions

View file

@ -21,11 +21,11 @@
Port to GDB-6.8pre.
Index: gdb-7.3.50.20110722/gdb/inferior.h
Index: gdb-7.4.50.20111218/gdb/inferior.h
===================================================================
--- gdb-7.3.50.20110722.orig/gdb/inferior.h 2011-07-22 01:46:08.000000000 +0200
+++ gdb-7.3.50.20110722/gdb/inferior.h 2011-07-22 19:13:30.000000000 +0200
@@ -158,7 +158,15 @@ extern void reopen_exec_file (void);
--- gdb-7.4.50.20111218.orig/gdb/inferior.h 2011-10-07 14:06:46.000000000 +0200
+++ gdb-7.4.50.20111218/gdb/inferior.h 2011-12-18 23:40:59.257300451 +0100
@@ -162,7 +162,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. */
@ -42,10 +42,10 @@ Index: gdb-7.3.50.20110722/gdb/inferior.h
extern ptid_t user_visible_resume_ptid (int step);
Index: gdb-7.3.50.20110722/gdb/infrun.c
Index: gdb-7.4.50.20111218/gdb/infrun.c
===================================================================
--- gdb-7.3.50.20110722.orig/gdb/infrun.c 2011-07-22 19:08:19.000000000 +0200
+++ gdb-7.3.50.20110722/gdb/infrun.c 2011-07-22 19:12:56.000000000 +0200
--- gdb-7.4.50.20111218.orig/gdb/infrun.c 2011-11-22 22:25:17.000000000 +0100
+++ gdb-7.4.50.20111218/gdb/infrun.c 2011-12-19 00:12:34.470854218 +0100
@@ -79,7 +79,7 @@ static int follow_fork (void);
static void set_schedlock_func (char *args, int from_tty,
struct cmd_list_element *c);
@ -55,7 +55,7 @@ Index: gdb-7.3.50.20110722/gdb/infrun.c
static int currently_stepping_or_nexting_callback (struct thread_info *tp,
void *data);
@@ -1630,7 +1630,8 @@ user_visible_resume_ptid (int step)
@@ -1668,7 +1668,8 @@ user_visible_resume_ptid (int step)
}
else if ((scheduler_mode == schedlock_on)
|| (scheduler_mode == schedlock_step
@ -65,7 +65,7 @@ Index: gdb-7.3.50.20110722/gdb/infrun.c
{
/* User-settable 'scheduler' mode requires solo thread resume. */
resume_ptid = inferior_ptid;
@@ -1648,7 +1649,7 @@ user_visible_resume_ptid (int step)
@@ -1686,7 +1687,7 @@ user_visible_resume_ptid (int step)
STEP nonzero if we should step (zero to continue instead).
SIG is the signal to give the inferior (zero for none). */
void
@ -74,7 +74,7 @@ Index: gdb-7.3.50.20110722/gdb/infrun.c
{
int should_resume = 1;
struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
@@ -1681,9 +1682,13 @@ resume (int step, enum target_signal sig
@@ -1719,9 +1720,13 @@ resume (int step, enum target_signal sig
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog,
@ -90,7 +90,7 @@ Index: gdb-7.3.50.20110722/gdb/infrun.c
target_pid_to_str (inferior_ptid),
paddress (gdbarch, pc));
@@ -2056,7 +2061,7 @@ proceed (CORE_ADDR addr, enum target_sig
@@ -2094,7 +2099,7 @@ proceed (CORE_ADDR addr, enum target_sig
struct thread_info *tp;
CORE_ADDR pc;
struct address_space *aspace;
@ -99,7 +99,7 @@ Index: gdb-7.3.50.20110722/gdb/infrun.c
/* If we're stopped at a fork/vfork, follow the branch set by the
"set follow-fork-mode" command; otherwise, we'll just proceed
@@ -2096,13 +2101,13 @@ proceed (CORE_ADDR addr, enum target_sig
@@ -2134,13 +2139,13 @@ proceed (CORE_ADDR addr, enum target_sig
actually be executing the breakpoint insn anyway.
We'll be (un-)executing the previous instruction. */
@ -115,7 +115,7 @@ Index: gdb-7.3.50.20110722/gdb/infrun.c
}
else
{
@@ -2133,13 +2138,13 @@ proceed (CORE_ADDR addr, enum target_sig
@@ -2171,13 +2176,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))
@ -131,7 +131,7 @@ Index: gdb-7.3.50.20110722/gdb/infrun.c
{
tp->control.trap_expected = 1;
/* If displaced stepping is enabled, we can step over the
@@ -2226,8 +2231,13 @@ proceed (CORE_ADDR addr, enum target_sig
@@ -2264,8 +2269,13 @@ proceed (CORE_ADDR addr, enum target_sig
/* Reset to normal state. */
init_infwait_state ();
@ -146,7 +146,7 @@ Index: gdb-7.3.50.20110722/gdb/infrun.c
/* Wait for it to stop (if not standalone)
and in any case decode why it stopped, and act accordingly. */
@@ -5123,14 +5133,19 @@ process_event_stop_test:
@@ -5223,13 +5233,18 @@ process_event_stop_test:
/* Is thread TP in the middle of single-stepping? */
@ -157,12 +157,10 @@ Index: gdb-7.3.50.20110722/gdb/infrun.c
- 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)
+ || tp->control.trap_expected)
+ return RESUME_STEP_USER;
+
+ if (bpstat_should_step ())
@ -172,27 +170,28 @@ Index: gdb-7.3.50.20110722/gdb/infrun.c
}
/* Returns true if any thread *but* the one passed in "data" is in the
Index: gdb-7.3.50.20110722/gdb/linux-nat.c
Index: gdb-7.4.50.20111218/gdb/linux-nat.c
===================================================================
--- gdb-7.3.50.20110722.orig/gdb/linux-nat.c 2011-07-22 19:08:19.000000000 +0200
+++ gdb-7.3.50.20110722/gdb/linux-nat.c 2011-07-22 19:10:24.000000000 +0200
@@ -2986,7 +2986,10 @@ count_events_callback (struct lwp_info *
static int
--- gdb-7.4.50.20111218.orig/gdb/linux-nat.c 2011-12-18 23:35:23.000000000 +0100
+++ gdb-7.4.50.20111218/gdb/linux-nat.c 2011-12-19 00:08:41.824855353 +0100
@@ -3036,7 +3036,11 @@ static int
select_singlestep_lwp_callback (struct lwp_info *lp, void *data)
{
- if (lp->step && lp->status != 0)
+ /* We do not focus on software watchpoints as we would not catch
+ STEPPING_PAST_SINGLESTEP_BREAKPOINT breakpoints in some other thread
+ as they would remain pending due to `Push back breakpoint for %s'. */
+ if (lp->step == RESUME_STEP_USER && lp->status != 0)
if (lp->last_resume_kind == resume_step
- && lp->status != 0)
+ && lp->status != 0
+ /* We do not focus on software watchpoints as we would not catch
+ STEPPING_PAST_SINGLESTEP_BREAKPOINT breakpoints in some other thread
+ as they would remain pending due to `Push back breakpoint for %s'. */
+ && lp->step == RESUME_STEP_USER)
return 1;
else
return 0;
Index: gdb-7.3.50.20110722/gdb/linux-nat.h
Index: gdb-7.4.50.20111218/gdb/linux-nat.h
===================================================================
--- gdb-7.3.50.20110722.orig/gdb/linux-nat.h 2011-07-22 19:08:19.000000000 +0200
+++ gdb-7.3.50.20110722/gdb/linux-nat.h 2011-07-22 19:10:24.000000000 +0200
@@ -55,8 +55,8 @@ struct lwp_info
--- gdb-7.4.50.20111218.orig/gdb/linux-nat.h 2011-12-18 23:35:23.000000000 +0100
+++ gdb-7.4.50.20111218/gdb/linux-nat.h 2011-12-18 23:40:59.262300431 +0100
@@ -74,8 +74,8 @@ struct lwp_info
/* If non-zero, a pending wait status. */
int status;