Rebase to FSF GDB 7.4.50.20120714.

- Fix entryval feature crash on some .debug files optimized by dwz (BZ 839596).
- Fix another stale frame_info * (PR 11914, like PR 13866).
This commit is contained in:
Jan Kratochvil 2012-07-15 10:41:46 +02:00
commit 8aabf36e77
13 changed files with 695 additions and 782 deletions

View file

@ -21,10 +21,10 @@
Port to GDB-6.8pre.
Index: gdb-7.4.50.20120602/gdb/inferior.h
Index: gdb-7.4.50.20120714/gdb/inferior.h
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/inferior.h 2012-05-24 18:39:09.000000000 +0200
+++ gdb-7.4.50.20120602/gdb/inferior.h 2012-06-02 18:24:12.875274179 +0200
--- gdb-7.4.50.20120714.orig/gdb/inferior.h 2012-06-13 20:15:05.000000000 +0200
+++ gdb-7.4.50.20120714/gdb/inferior.h 2012-07-14 23:21:01.795161794 +0200
@@ -159,7 +159,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.4.50.20120602/gdb/inferior.h
extern ptid_t user_visible_resume_ptid (int step);
Index: gdb-7.4.50.20120602/gdb/infrun.c
Index: gdb-7.4.50.20120714/gdb/infrun.c
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/infrun.c 2012-05-28 22:43:26.000000000 +0200
+++ gdb-7.4.50.20120602/gdb/infrun.c 2012-06-02 18:23:59.339278268 +0200
--- gdb-7.4.50.20120714.orig/gdb/infrun.c 2012-07-01 12:37:04.000000000 +0200
+++ gdb-7.4.50.20120714/gdb/infrun.c 2012-07-14 23:21:01.800161767 +0200
@@ -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.4.50.20120602/gdb/infrun.c
static int currently_stepping_or_nexting_callback (struct thread_info *tp,
void *data);
@@ -1687,7 +1687,8 @@ user_visible_resume_ptid (int step)
@@ -1672,7 +1672,8 @@ user_visible_resume_ptid (int step)
}
else if ((scheduler_mode == schedlock_on)
|| (scheduler_mode == schedlock_step
@ -65,7 +65,7 @@ Index: gdb-7.4.50.20120602/gdb/infrun.c
{
/* User-settable 'scheduler' mode requires solo thread resume. */
resume_ptid = inferior_ptid;
@@ -1705,7 +1706,7 @@ user_visible_resume_ptid (int step)
@@ -1690,7 +1691,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.4.50.20120602/gdb/infrun.c
{
int should_resume = 1;
struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0);
@@ -1738,9 +1739,13 @@ resume (int step, enum gdb_signal sig)
@@ -1723,9 +1724,13 @@ resume (int step, enum gdb_signal sig)
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog,
@ -90,7 +90,7 @@ Index: gdb-7.4.50.20120602/gdb/infrun.c
target_pid_to_str (inferior_ptid),
paddress (gdbarch, pc));
@@ -2117,7 +2122,7 @@ proceed (CORE_ADDR addr, enum gdb_signal
@@ -2102,7 +2107,7 @@ proceed (CORE_ADDR addr, enum gdb_signal
struct thread_info *tp;
CORE_ADDR pc;
struct address_space *aspace;
@ -99,7 +99,7 @@ Index: gdb-7.4.50.20120602/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
@@ -2157,13 +2162,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
@@ -2142,13 +2147,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
actually be executing the breakpoint insn anyway.
We'll be (un-)executing the previous instruction. */
@ -115,7 +115,7 @@ Index: gdb-7.4.50.20120602/gdb/infrun.c
}
else
{
@@ -2194,13 +2199,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
@@ -2179,13 +2184,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
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.4.50.20120602/gdb/infrun.c
{
tp->control.trap_expected = 1;
/* If displaced stepping is enabled, we can step over the
@@ -2287,8 +2292,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
@@ -2272,8 +2277,13 @@ proceed (CORE_ADDR addr, enum gdb_signal
/* Reset to normal state. */
init_infwait_state ();
@ -146,7 +146,7 @@ Index: gdb-7.4.50.20120602/gdb/infrun.c
/* Wait for it to stop (if not standalone)
and in any case decode why it stopped, and act accordingly. */
@@ -5249,13 +5259,18 @@ process_event_stop_test:
@@ -5205,13 +5215,18 @@ process_event_stop_test:
/* Is thread TP in the middle of single-stepping? */
@ -170,11 +170,11 @@ Index: gdb-7.4.50.20120602/gdb/infrun.c
}
/* Returns true if any thread *but* the one passed in "data" is in the
Index: gdb-7.4.50.20120602/gdb/linux-nat.c
Index: gdb-7.4.50.20120714/gdb/linux-nat.c
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/linux-nat.c 2012-05-24 18:51:34.000000000 +0200
+++ gdb-7.4.50.20120602/gdb/linux-nat.c 2012-06-02 18:23:07.409293800 +0200
@@ -3051,7 +3051,11 @@ static int
--- gdb-7.4.50.20120714.orig/gdb/linux-nat.c 2012-07-07 14:13:56.000000000 +0200
+++ gdb-7.4.50.20120714/gdb/linux-nat.c 2012-07-14 23:21:01.803161750 +0200
@@ -2982,7 +2982,11 @@ static int
select_singlestep_lwp_callback (struct lwp_info *lp, void *data)
{
if (lp->last_resume_kind == resume_step
@ -187,10 +187,10 @@ Index: gdb-7.4.50.20120602/gdb/linux-nat.c
return 1;
else
return 0;
Index: gdb-7.4.50.20120602/gdb/linux-nat.h
Index: gdb-7.4.50.20120714/gdb/linux-nat.h
===================================================================
--- gdb-7.4.50.20120602.orig/gdb/linux-nat.h 2012-03-21 14:43:54.000000000 +0100
+++ gdb-7.4.50.20120602/gdb/linux-nat.h 2012-06-02 18:23:07.411293798 +0200
--- gdb-7.4.50.20120714.orig/gdb/linux-nat.h 2012-07-06 18:52:20.000000000 +0200
+++ gdb-7.4.50.20120714/gdb/linux-nat.h 2012-07-14 23:21:17.414075355 +0200
@@ -73,8 +73,8 @@ struct lwp_info
/* If non-zero, a pending wait status. */
int status;
@ -200,5 +200,5 @@ Index: gdb-7.4.50.20120602/gdb/linux-nat.h
+ /* The kind of stepping of this LWP. */
+ enum resume_step step;
/* Non-zero si_signo if this LWP stopped with a trap. si_addr may
be the address of a hardware watchpoint. */
/* STOPPED_BY_WATCHPOINT is non-zero if this LWP stopped with a data
watchpoint trap. */