Rebase to FSF GDB 7.5.50.20130215 (pre-7.6 snapshot).

This commit is contained in:
Jan Kratochvil 2013-02-18 18:14:00 +01:00
commit ab333d9938
17 changed files with 836 additions and 1368 deletions

View file

@ -1,8 +1,8 @@
Index: gdb-7.4.50.20120703/gdb/linux-nat.c
Index: gdb-7.5.50.20130215/gdb/linux-nat.c
===================================================================
--- gdb-7.4.50.20120703.orig/gdb/linux-nat.c 2012-07-03 17:46:55.000000000 +0200
+++ gdb-7.4.50.20120703/gdb/linux-nat.c 2012-07-03 17:57:29.608734933 +0200
@@ -180,6 +180,9 @@ blocked. */
--- gdb-7.5.50.20130215.orig/gdb/linux-nat.c 2013-02-15 22:38:05.000000000 +0100
+++ gdb-7.5.50.20130215/gdb/linux-nat.c 2013-02-15 22:44:59.638985719 +0100
@@ -181,6 +181,9 @@ blocked. */
static struct target_ops *linux_ops;
static struct target_ops linux_ops_saved;
@ -12,7 +12,7 @@ Index: gdb-7.4.50.20120703/gdb/linux-nat.c
/* The method to call, if any, when a new thread is attached. */
static void (*linux_nat_new_thread) (struct lwp_info *);
@@ -909,7 +912,14 @@ holding the child stopped. Try \"set de
@@ -914,7 +917,14 @@ holding the child stopped. Try \"set de
parent_inf->waiting_for_vfork_done = 0;
}
else if (detach_fork)
@ -28,7 +28,7 @@ Index: gdb-7.4.50.20120703/gdb/linux-nat.c
/* Note that the detach above makes PARENT_INF dangling. */
@@ -1377,6 +1387,7 @@ linux_nat_post_attach_wait (ptid_t ptid,
@@ -1362,6 +1372,7 @@ linux_nat_post_attach_wait (ptid_t ptid,
if (debug_linux_nat)
fprintf_unfiltered (gdb_stdlog,
"LNPAW: Attaching to a stopped process\n");
@ -36,7 +36,7 @@ Index: gdb-7.4.50.20120703/gdb/linux-nat.c
/* The process is definitely stopped. It is in a job control
stop, unless the kernel predates the TASK_STOPPED /
@@ -1805,6 +1816,9 @@ get_pending_status (struct lwp_info *lp,
@@ -1790,6 +1801,9 @@ get_pending_status (struct lwp_info *lp,
gdb_signal_to_string (signo));
}
@ -46,7 +46,7 @@ Index: gdb-7.4.50.20120703/gdb/linux-nat.c
return 0;
}
@@ -1918,6 +1932,8 @@ linux_nat_detach (struct target_ops *ops
@@ -1900,6 +1914,8 @@ linux_nat_detach (struct target_ops *ops
}
else
linux_ops->to_detach (ops, args, from_tty);
@ -55,7 +55,7 @@ Index: gdb-7.4.50.20120703/gdb/linux-nat.c
}
/* Resume LP. */
@@ -2104,6 +2120,14 @@ linux_nat_resume (struct target_ops *ops
@@ -2086,6 +2102,14 @@ linux_nat_resume (struct target_ops *ops
linux_nat_resume_callback. */
lp->stopped = 0;
@ -70,19 +70,19 @@ Index: gdb-7.4.50.20120703/gdb/linux-nat.c
if (resume_many)
iterate_over_lwps (ptid, linux_nat_resume_callback, NULL);
@@ -4129,6 +4153,8 @@ linux_nat_mourn_inferior (struct target_
there are other viable forks to debug. Delete the exiting
one and context-switch to the first available. */
linux_fork_mourn_inferior ();
@@ -4137,6 +4161,8 @@ linux_nat_mourn_inferior (struct target_
/* Let the arch-specific native code know this process is gone. */
linux_nat_forget_process (pid);
+
+ pid_was_stopped = 0;
}
/* Convert a native/host siginfo object, into/from the siginfo in the
Index: gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/attach-stopped.exp
Index: gdb-7.5.50.20130215/gdb/testsuite/gdb.threads/attach-stopped.exp
===================================================================
--- gdb-7.4.50.20120703.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2012-06-26 21:23:20.000000000 +0200
+++ gdb-7.4.50.20120703/gdb/testsuite/gdb.threads/attach-stopped.exp 2012-07-03 17:56:43.797790120 +0200
--- gdb-7.5.50.20130215.orig/gdb/testsuite/gdb.threads/attach-stopped.exp 2013-01-01 07:41:27.000000000 +0100
+++ gdb-7.5.50.20130215/gdb/testsuite/gdb.threads/attach-stopped.exp 2013-02-15 22:44:23.262930312 +0100
@@ -61,7 +61,65 @@ proc corefunc { threadtype } {
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}