diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/bfd/ChangeLog ./bfd/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/bfd/ChangeLog	2015-01-09 01:48:33.000000000 +0000
+++ ./bfd/ChangeLog	2015-01-10 01:48:27.000000000 +0000
@@ -1,3 +1,14 @@
+2015-01-09  Nick Clifton  <nickc@redhat.com>
+
+	* tekhex.c (getvalue): Fix thinko in test for correct extraction
+	of value.
+	(getsym): Return false if there was not enough data to extract the
+	symbol.
+
+2015-01-09  Anthony Green  <green@moxielogic.com>
+
+	* elf32-moxie.c (ELF_MACHINE_ALT1): Define.
+
 2015-01-08  Nick Clifton  <nickc@redhat.com>
 
 	* elf32-msp430.c (msp430_elf_relax_section): Add relaxation of
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/bfd/elf32-moxie.c ./bfd/elf32-moxie.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/bfd/elf32-moxie.c	2015-01-09 01:48:33.000000000 +0000
+++ ./bfd/elf32-moxie.c	2015-01-10 01:48:27.000000000 +0000
@@ -371,6 +371,7 @@ moxie_elf_check_relocs (bfd *abfd,
 
 #define ELF_ARCH		bfd_arch_moxie
 #define ELF_MACHINE_CODE	EM_MOXIE
+#define ELF_MACHINE_ALT1        EM_MOXIE_OLD
 #define ELF_MAXPAGESIZE		0x1
 
 #define TARGET_BIG_SYM          moxie_elf32_be_vec
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/bfd/tekhex.c ./bfd/tekhex.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/bfd/tekhex.c	2015-01-09 01:48:34.000000000 +0000
+++ ./bfd/tekhex.c	2015-01-10 01:48:28.000000000 +0000
@@ -288,7 +288,7 @@ getvalue (char **srcp, bfd_vma *valuep, 
 
   *srcp = src;
   *valuep = value;
-  return len == 0;
+  return len == -1U;
 }
 
 static bfd_boolean
@@ -309,7 +309,7 @@ getsym (char *dstp, char **srcp, unsigne
   dstp[i] = 0;
   *srcp = src + i;
   *lenp = len;
-  return TRUE;
+  return i == len;
 }
 
 static struct data_struct *
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/bfd/version.h ./bfd/version.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/bfd/version.h	2015-01-09 01:48:34.000000000 +0000
+++ ./bfd/version.h	2015-01-10 01:48:28.000000000 +0000
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20150109
+#define BFD_VERSION_DATE 20150110
 #define BFD_VERSION @bfd_version@
 #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
 #define REPORT_BUGS_TO @report_bugs_to@
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/djunpack.bat ./djunpack.bat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/djunpack.bat	2015-01-09 01:53:58.000000000 +0000
+++ ./djunpack.bat	2015-01-10 01:51:23.000000000 +0000
@@ -17,8 +17,8 @@ Rem
 Rem The following 2 lines need to be changed with each new GDB release, to
 Rem be identical to the name of the top-level directory where the GDB
 Rem distribution unpacks itself.
-set GDBVER=$package-7.8.50.20150109
-if "%GDBVER%"=="$package-7.8.50.20150109" GoTo EnvOk
+set GDBVER=$package-7.8.50.20150110
+if "%GDBVER%"=="$package-7.8.50.20150110" GoTo EnvOk
 Rem If their environment space is too small, re-exec with a larger one
 command.com /e:4096 /c %0 %1
 GoTo End
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/breakpoint.c ./gdb/breakpoint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/breakpoint.c	2015-01-09 01:48:36.000000000 +0000
+++ ./gdb/breakpoint.c	2015-01-10 01:48:29.000000000 +0000
@@ -4226,29 +4226,45 @@ moribund_breakpoint_here_p (struct addre
   return 0;
 }
 
+/* Returns non-zero iff BL is inserted at PC, in address space
+   ASPACE.  */
+
+static int
+bp_location_inserted_here_p (struct bp_location *bl,
+			     struct address_space *aspace, CORE_ADDR pc)
+{
+  if (bl->inserted
+      && breakpoint_address_match (bl->pspace->aspace, bl->address,
+				   aspace, pc))
+    {
+      if (overlay_debugging
+	  && section_is_overlay (bl->section)
+	  && !section_is_mapped (bl->section))
+	return 0;		/* unmapped overlay -- can't be a match */
+      else
+	return 1;
+    }
+  return 0;
+}
+
 /* Returns non-zero iff there's a breakpoint inserted at PC.  */
 
 int
 breakpoint_inserted_here_p (struct address_space *aspace, CORE_ADDR pc)
 {
-  struct bp_location *bl, **blp_tmp;
+  struct bp_location **blp, **blp_tmp = NULL;
+  struct bp_location *bl;
 
-  ALL_BP_LOCATIONS (bl, blp_tmp)
+  ALL_BP_LOCATIONS_AT_ADDR (blp, blp_tmp, pc)
     {
+      struct bp_location *bl = *blp;
+
       if (bl->loc_type != bp_loc_software_breakpoint
 	  && bl->loc_type != bp_loc_hardware_breakpoint)
 	continue;
 
-      if (bl->inserted
-	  && breakpoint_location_address_match (bl, aspace, pc))
-	{
-	  if (overlay_debugging 
-	      && section_is_overlay (bl->section)
-	      && !section_is_mapped (bl->section))
-	    continue;		/* unmapped overlay -- can't be a match */
-	  else
-	    return 1;
-	}
+      if (bp_location_inserted_here_p (bl, aspace, pc))
+	return 1;
     }
   return 0;
 }
@@ -4260,24 +4276,41 @@ int
 software_breakpoint_inserted_here_p (struct address_space *aspace,
 				     CORE_ADDR pc)
 {
-  struct bp_location *bl, **blp_tmp;
+  struct bp_location **blp, **blp_tmp = NULL;
+  struct bp_location *bl;
 
-  ALL_BP_LOCATIONS (bl, blp_tmp)
+  ALL_BP_LOCATIONS_AT_ADDR (blp, blp_tmp, pc)
     {
+      struct bp_location *bl = *blp;
+
       if (bl->loc_type != bp_loc_software_breakpoint)
 	continue;
 
-      if (bl->inserted
-	  && breakpoint_address_match (bl->pspace->aspace, bl->address,
-				       aspace, pc))
-	{
-	  if (overlay_debugging 
-	      && section_is_overlay (bl->section)
-	      && !section_is_mapped (bl->section))
-	    continue;		/* unmapped overlay -- can't be a match */
-	  else
-	    return 1;
-	}
+      if (bp_location_inserted_here_p (bl, aspace, pc))
+	return 1;
+    }
+
+  return 0;
+}
+
+/* See breakpoint.h.  */
+
+int
+hardware_breakpoint_inserted_here_p (struct address_space *aspace,
+				     CORE_ADDR pc)
+{
+  struct bp_location **blp, **blp_tmp = NULL;
+  struct bp_location *bl;
+
+  ALL_BP_LOCATIONS_AT_ADDR (blp, blp_tmp, pc)
+    {
+      struct bp_location *bl = *blp;
+
+      if (bl->loc_type != bp_loc_hardware_breakpoint)
+	continue;
+
+      if (bp_location_inserted_here_p (bl, aspace, pc))
+	return 1;
     }
 
   return 0;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/breakpoint.h ./gdb/breakpoint.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/breakpoint.h	2015-01-09 01:48:36.000000000 +0000
+++ ./gdb/breakpoint.h	2015-01-10 01:48:29.000000000 +0000
@@ -1130,6 +1130,11 @@ extern int regular_breakpoint_inserted_h
 extern int software_breakpoint_inserted_here_p (struct address_space *, 
 						CORE_ADDR);
 
+/* Return non-zero iff there is a hardware breakpoint inserted at
+   PC.  */
+extern int hardware_breakpoint_inserted_here_p (struct address_space *,
+						CORE_ADDR);
+
 /* Check whether any location of BP is inserted at PC.  */
 
 extern int breakpoint_has_location_inserted_here (struct breakpoint *bp,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/ChangeLog ./gdb/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/ChangeLog	2015-01-09 01:48:36.000000000 +0000
+++ ./gdb/ChangeLog	2015-01-10 01:48:29.000000000 +0000
@@ -1,3 +1,164 @@
+2015-01-09  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* Makefile.in (.y.c): Don't munge yacc's #line
+	directives.
+
+2015-01-09  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* utils.c (defaulted_query): Rewrite to use gdb_readline_wrapper
+	to prompt for input.
+	* tui/tui-hooks.c (tui_query_hook): Remove.
+	(tui_install_hooks): Don't set deprecated_query_hook.
+	* tui/tui-io.c (tui_redisplay_readline): Fix off-by-one error in
+	height calculation.  Always update the command window's cur_line.
+
+2015-01-09  Pedro Alves  <palves@redhat.com>
+
+	* breakpoint.c (hardware_breakpoint_inserted_here_p): New
+	function.
+	* breakpoint.h (hardware_breakpoint_inserted_here_p): New
+	declaration.
+	* linux-nat.c (linux_nat_status_is_event): Move higher up in file.
+	(linux_resume_one_lwp): Store the thread's PC.  Adjust to clear
+	stop_reason.
+	(check_stopped_by_watchpoint): New function.
+	(save_sigtrap): Reimplement.
+	(linux_nat_stopped_by_watchpoint): Adjust.
+	(linux_nat_lp_status_is_event): Delete.
+	(stop_wait_callback): Only call save_sigtrap after storing the
+	pending status.
+	(status_callback): If the thread had been stopped for a breakpoint
+	that has since been removed, discard the event and resume the LWP.
+	(count_events_callback, select_event_lwp_callback): Use
+	lwp_status_pending_p instead of linux_nat_lp_status_is_event.
+	(cancel_breakpoint): Rename to ...
+	(check_stopped_by_breakpoint): ... this.  Record whether the LWP
+	stopped for a software breakpoint or hardware breakpoint.
+	(select_event_lwp): Only give preference to the stepping LWP in
+	all-stop mode.  Adjust comments.
+	(stop_and_resume_callback): Remove references to new_pending_p.
+	(linux_nat_filter_event): Likewise.  Leave exit events of the
+	leader thread pending here.  Handle signal short circuiting here.
+	Only call save_sigtrap after storing the pending waitstatus.
+	(linux_nat_wait_1): Remove 'retry' label.  Remove references to
+	new_pending.  Don't handle leaving events the caller is not
+	interested in pending here, nor handle signal short-circuiting
+	here.  Also give equal priority to all LWPs that have had events
+	in non-stop mode.  If reporting a software breakpoint event,
+	unadjust the LWP's PC.
+	* linux-nat.h (enum lwp_stop_reason): New.
+	(struct lwp_info) <stop_pc>: New field.
+	(struct lwp_info) <stopped_by_watchpoint>: Delete field.
+	(struct lwp_info) <stop_reason>: New field.
+	* x86-linux-nat.c (x86_linux_prepare_to_resume): Adjust.
+
+2015-01-09  Pedro Alves  <palves@redhat.com>
+
+	* linux-nat.c (linux_handle_extended_wait) <PTRACE_EVENT_EXEC>:
+	Set the LWP's 'resumed' flag.
+
+2015-01-09  Pedro Alves  <palves@redhat.com>
+
+	* linux-nat.c (linux_resume_one_lwp): New function.
+	(resume_lwp): Use lwp_status_pending_p and linux_resume_one_lwp.
+	(linux_nat_resume): Use lwp_status_pending_p and
+	linux_resume_one_lwp.
+	(linux_handle_syscall_trap): Use linux_resume_one_lwp.
+	(linux_handle_extended_wait): Use linux_resume_one_lwp.
+	(status_callback, running_callback): Use lwp_status_pending_p.
+	(lwp_status_pending_p): New function.
+	(stop_and_resume_callback): Use lwp_status_pending_p.
+	(linux_nat_filter_event): Use linux_resume_one_lwp.
+	(linux_nat_wait_1): Always use status_callback to look for an LWP
+	with a pending status.  Use linux_resume_one_lwp.
+	(resume_stopped_resumed_lwps): Use lwp_status_pending_p and
+	linux_resume_one_lwp.
+
+2015-01-09  Pedro Alves  <palves@redhat.com>
+
+	* breakpoint.c (bp_location_inserted_here_p): New function,
+	factored out from ...
+	(breakpoint_inserted_here_p): ... here.  Use
+	ALL_BP_LOCATIONS_AT_ADDR.
+	(software_breakpoint_inserted_here_p): Use
+	bp_location_inserted_here_p and ALL_BP_LOCATIONS_AT_ADDR.
+
+2014-01-09  Pedro Alves  <palves@redhat.com>
+
+	Skip enabling event reporting if the kernel supports
+	PTRACE_EVENT_CLONE.
+	* linux-thread-db.c: Include "nat/linux-ptrace.h".
+	(thread_db_use_events): New function.
+	(try_thread_db_load_1): Check thread_db_use_events before enabling
+	event reporting.
+	(update_thread_state): New function.
+	(attach_thread): Use it.  Check thread_db_use_events before
+	enabling event reporting.
+	(thread_db_detach): Check thread_db_use_events before disabling
+	event reporting.
+	(find_new_threads_callback): Check thread_db_use_events before
+	enabling event reporting.  Update the thread's state if not using
+	libthread_db events.
+
+2015-01-09  Pedro Alves  <palves@redhat.com>
+
+	* linux-nat.c (lin_lwp_attach_lwp): Assert that the lwp id we're
+	about to wait for is > 0.
+	* linux-thread-db.c (find_new_threads_callback): Ignore thread if
+	the kernel thread ID is -1.
+
+2015-01-09  Pedro Alves  <palves@redhat.com>
+
+	* linux-nat.c (attach_proc_task_lwp_callback): New function.
+	(linux_nat_attach): Use linux_proc_attach_tgid_threads.
+	(wait_lwp, linux_nat_filter_event): If not set yet, set the lwp's
+	ptrace option flags.
+	* linux-nat.h (struct lwp_info) <must_set_ptrace_flags>: New
+	field.
+	* nat/linux-procfs.c: Include <dirent.h>.
+	(linux_proc_get_int): New parameter "warn".  Handle it.
+	(linux_proc_get_tgid): Adjust.
+	(linux_proc_get_tracerpid): Rename to ...
+	(linux_proc_get_tracerpid_nowarn): ... this.
+	(linux_proc_pid_get_state): New function, factored out from
+	(linux_proc_pid_has_state): ... this.  Add new parameter "warn"
+	and handle it.
+	(linux_proc_pid_is_gone): New function.
+	(linux_proc_pid_is_stopped): Adjust.
+	(linux_proc_pid_is_zombie_maybe_warn)
+	(linux_proc_pid_is_zombie_nowarn): New functions.
+	(linux_proc_pid_is_zombie): Use
+	linux_proc_pid_is_zombie_maybe_warn.
+	(linux_proc_attach_tgid_threads): New function.
+	* nat/linux-procfs.h (linux_proc_get_tgid): Update comment.
+	(linux_proc_get_tracerpid): Rename to ...
+	(linux_proc_get_tracerpid_nowarn): ... this, and update comment.
+	(linux_proc_pid_is_gone): New declaration.
+	(linux_proc_pid_is_zombie): Update comment.
+	(linux_proc_pid_is_zombie_nowarn): New declaration.
+	(linux_proc_attach_lwp_func): New typedef.
+	(linux_proc_attach_tgid_threads): New declaration.
+	* nat/linux-ptrace.c (linux_ptrace_attach_fail_reason): Adjust to
+	use nowarn functions.
+	(linux_ptrace_attach_fail_reason_string): Move here from
+	gdbserver/linux-low.c and rename.
+	(ptrace_supports_feature): If the current ptrace options are not
+	known yet, check them now, instead of asserting.
+	* nat/linux-ptrace.h (linux_ptrace_attach_fail_reason_string):
+	Declare.
+
+2015-01-09  Pedro Alves  <palves@redhat.com>
+
+	* linux-thread-db.c (thread_db_find_new_threads_silently)
+	(try_thread_db_load_1, try_thread_db_load, thread_db_load_search)
+	(find_new_threads_once): Print debug output on gdb_stdlog.
+
+2015-01-09  Chen Gang  <gang.chen.5i5j@gmail.com>
+	    Pedro Alves  <palves@redhat.com>
+
+	* compile/compile.c: Include "gdb_wait.h".
+	(do_rmdir): Check return value, and free 'zap'.
+
 2015-01-08  Pedro Alves  <palves@redhat.com>
 	    Yao Qi  <yao@codesourcery.com>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/compile/compile.c ./gdb/compile/compile.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/compile/compile.c	2015-01-09 01:48:36.000000000 +0000
+++ ./gdb/compile/compile.c	2015-01-10 01:48:29.000000000 +0000
@@ -37,6 +37,7 @@
 #include "filestuff.h"
 #include "target.h"
 #include "osabi.h"
+#include "gdb_wait.h"
 
 
 
@@ -169,10 +170,14 @@ do_rmdir (void *arg)
 {
   const char *dir = arg;
   char *zap;
-  
+  int wstat;
+
   gdb_assert (strncmp (dir, TMP_PREFIX, strlen (TMP_PREFIX)) == 0);
   zap = concat ("rm -rf ", dir, (char *) NULL);
-  system (zap);
+  wstat = system (zap);
+  if (wstat == -1 || !WIFEXITED (wstat) || WEXITSTATUS (wstat) != 0)
+    warning (_("Could not remove temporary directory %s"), dir);
+  XDELETEVEC (zap);
 }
 
 /* Return the name of the temporary directory to use for .o files, and
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gcore.1 ./gdb/doc/gcore.1
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gcore.1	2015-01-09 01:52:25.000000000 +0000
+++ ./gdb/doc/gcore.1	2015-01-10 01:51:15.000000000 +0000
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GCORE 1"
-.TH GCORE 1 "2015-01-09" "gdb-7.8.50.20150109-cvs" "GNU Development Tools"
+.TH GCORE 1 "2015-01-10" "gdb-7.8.50.20150110-cvs" "GNU Development Tools"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gdb.1 ./gdb/doc/gdb.1
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gdb.1	2015-01-09 01:52:25.000000000 +0000
+++ ./gdb/doc/gdb.1	2015-01-10 01:51:15.000000000 +0000
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GDB 1"
-.TH GDB 1 "2015-01-09" "gdb-7.8.50.20150109-cvs" "GNU Development Tools"
+.TH GDB 1 "2015-01-10" "gdb-7.8.50.20150110-cvs" "GNU Development Tools"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gdb.info ./gdb/doc/gdb.info
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gdb.info	2015-01-09 01:52:25.000000000 +0000
+++ ./gdb/doc/gdb.info	2015-01-10 01:51:14.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150109-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150110-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gdb.info-1 ./gdb/doc/gdb.info-1
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gdb.info-1	2015-01-09 01:52:24.000000000 +0000
+++ ./gdb/doc/gdb.info-1	2015-01-10 01:51:14.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150109-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150110-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
@@ -45,7 +45,7 @@ Debugging with GDB
 
 This file describes GDB, the GNU symbolic debugger.
 
-   This is the Tenth Edition, for GDB (GDB) Version 7.8.50.20150109-cvs.
+   This is the Tenth Edition, for GDB (GDB) Version 7.8.50.20150110-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
@@ -494,7 +494,7 @@ Let us use GDB to try to see what is goi
      There is absolutely no warranty for GDB; type "show warranty"
       for details.
 
-     GDB 7.8.50.20150109-cvs, Copyright 1999 Free Software Foundation, Inc...
+     GDB 7.8.50.20150110-cvs, Copyright 1999 Free Software Foundation, Inc...
      (gdb)
 
 GDB reads only enough symbol data to know where to find the rest when
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gdb.info-2 ./gdb/doc/gdb.info-2
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gdb.info-2	2015-01-09 01:52:24.000000000 +0000
+++ ./gdb/doc/gdb.info-2	2015-01-10 01:51:14.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150109-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150110-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gdb.info-3 ./gdb/doc/gdb.info-3
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gdb.info-3	2015-01-09 01:52:24.000000000 +0000
+++ ./gdb/doc/gdb.info-3	2015-01-10 01:51:14.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150109-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150110-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gdb.info-4 ./gdb/doc/gdb.info-4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gdb.info-4	2015-01-09 01:52:24.000000000 +0000
+++ ./gdb/doc/gdb.info-4	2015-01-10 01:51:14.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150109-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150110-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gdb.info-5 ./gdb/doc/gdb.info-5
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gdb.info-5	2015-01-09 01:52:24.000000000 +0000
+++ ./gdb/doc/gdb.info-5	2015-01-10 01:51:14.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150109-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150110-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
@@ -8107,7 +8107,7 @@ and TeX (or `texi2roff') to typeset the 
 
    GDB includes an already formatted copy of the on-line Info version
 of this manual in the `gdb' subdirectory.  The main Info file is
-`gdb-7.8.50.20150109-cvs/gdb/gdb.info', and it refers to subordinate
+`gdb-7.8.50.20150110-cvs/gdb/gdb.info', and it refers to subordinate
 files matching `gdb.info*' in the same directory.  If necessary, you
 can print out these files, or read them with any editor; but they are
 easier to read using the `info' subsystem in GNU Emacs or the
@@ -8118,8 +8118,8 @@ distribution.
 Info formatting programs, such as `texinfo-format-buffer' or `makeinfo'.
 
    If you have `makeinfo' installed, and are in the top level GDB
-source directory (`gdb-7.8.50.20150109-cvs', in the case of version
-7.8.50.20150109-cvs), you can make the Info file by typing:
+source directory (`gdb-7.8.50.20150110-cvs', in the case of version
+7.8.50.20150110-cvs), you can make the Info file by typing:
 
      cd gdb
      make gdb.info
@@ -8144,7 +8144,7 @@ format.  On its own, TeX cannot either r
 
    If you have TeX and a DVI printer program installed, you can typeset
 and print this manual.  First switch to the `gdb' subdirectory of the
-main source directory (for example, to `gdb-7.8.50.20150109-cvs/gdb')
+main source directory (for example, to `gdb-7.8.50.20150110-cvs/gdb')
 and type:
 
      make gdb.dvi
@@ -8153,8 +8153,8 @@ and type:
 
    ---------- Footnotes ----------
 
-   (1) In `gdb-7.8.50.20150109-cvs/gdb/refcard.ps' of the version
-7.8.50.20150109-cvs release.
+   (1) In `gdb-7.8.50.20150110-cvs/gdb/refcard.ps' of the version
+7.8.50.20150110-cvs release.
 
 
 File: gdb.info,  Node: Installing GDB,  Next: Maintenance Commands,  Prev: Formatting Documentation,  Up: Top
@@ -8263,39 +8263,39 @@ preparing GDB for installation; you can 
 in a single directory, whose name is usually composed by appending the
 version number to `gdb'.
 
-   For example, the GDB version 7.8.50.20150109-cvs distribution is in
-the `gdb-7.8.50.20150109-cvs' directory.  That directory contains:
+   For example, the GDB version 7.8.50.20150110-cvs distribution is in
+the `gdb-7.8.50.20150110-cvs' directory.  That directory contains:
 
-`gdb-7.8.50.20150109-cvs/configure (and supporting files)'
+`gdb-7.8.50.20150110-cvs/configure (and supporting files)'
      script for configuring GDB and all its supporting libraries
 
-`gdb-7.8.50.20150109-cvs/gdb'
+`gdb-7.8.50.20150110-cvs/gdb'
      the source specific to GDB itself
 
-`gdb-7.8.50.20150109-cvs/bfd'
+`gdb-7.8.50.20150110-cvs/bfd'
      source for the Binary File Descriptor library
 
-`gdb-7.8.50.20150109-cvs/include'
+`gdb-7.8.50.20150110-cvs/include'
      GNU include files
 
-`gdb-7.8.50.20150109-cvs/libiberty'
+`gdb-7.8.50.20150110-cvs/libiberty'
      source for the `-liberty' free software library
 
-`gdb-7.8.50.20150109-cvs/opcodes'
+`gdb-7.8.50.20150110-cvs/opcodes'
      source for the library of opcode tables and disassemblers
 
-`gdb-7.8.50.20150109-cvs/readline'
+`gdb-7.8.50.20150110-cvs/readline'
      source for the GNU command-line interface
 
-`gdb-7.8.50.20150109-cvs/glob'
+`gdb-7.8.50.20150110-cvs/glob'
      source for the GNU filename pattern-matching subroutine
 
-`gdb-7.8.50.20150109-cvs/mmalloc'
+`gdb-7.8.50.20150110-cvs/mmalloc'
      source for the GNU memory-mapped malloc package
 
    The simplest way to configure and build GDB is to run `configure'
 from the `gdb-VERSION-NUMBER' source directory, which in this example
-is the `gdb-7.8.50.20150109-cvs' directory.
+is the `gdb-7.8.50.20150110-cvs' directory.
 
    First switch to the `gdb-VERSION-NUMBER' source directory if you are
 not already in it; then run `configure'.  Pass the identifier for the
@@ -8303,7 +8303,7 @@ platform on which GDB will run as an arg
 
    For example:
 
-     cd gdb-7.8.50.20150109-cvs
+     cd gdb-7.8.50.20150110-cvs
      ./configure HOST
      make
 
@@ -8325,8 +8325,8 @@ you may need to run `sh' on it explicitl
 
    If you run `configure' from a directory that contains source
 directories for multiple libraries or programs, such as the
-`gdb-7.8.50.20150109-cvs' source directory for version
-7.8.50.20150109-cvs, `configure' creates configuration files for every
+`gdb-7.8.50.20150110-cvs' source directory for version
+7.8.50.20150110-cvs, `configure' creates configuration files for every
 directory level underneath (unless you tell it not to, with the
 `--norecursion' option).
 
@@ -8367,13 +8367,13 @@ directory.  If the path to `configure' w
 argument to `--srcdir', you can leave out the `--srcdir' option; it is
 assumed.)
 
-   For example, with version 7.8.50.20150109-cvs, you can build GDB in a
+   For example, with version 7.8.50.20150110-cvs, you can build GDB in a
 separate directory for a Sun 4 like this:
 
-     cd gdb-7.8.50.20150109-cvs
+     cd gdb-7.8.50.20150110-cvs
      mkdir ../gdb-sun4
      cd ../gdb-sun4
-     ../gdb-7.8.50.20150109-cvs/configure sun4
+     ../gdb-7.8.50.20150110-cvs/configure sun4
      make
 
    When `configure' builds a configuration using a remote source
@@ -8384,7 +8384,7 @@ directory `gdb-sun4/libiberty', and GDB 
 
    Make sure that your path to the `configure' script has just one
 instance of `gdb' in it.  If your path to `configure' looks like
-`../gdb-7.8.50.20150109-cvs/gdb/configure', you are configuring only
+`../gdb-7.8.50.20150110-cvs/gdb/configure', you are configuring only
 one subdirectory of GDB, not the whole package.  This leads to build
 errors about missing include files such as `bfd/bfd.h'.
 
@@ -8400,8 +8400,8 @@ called `configure' (or one of its subdir
 
    The `Makefile' that `configure' generates in each source directory
 also runs recursively.  If you type `make' in a source directory such
-as `gdb-7.8.50.20150109-cvs' (or in a separate configured directory
-configured with `--srcdir=DIRNAME/gdb-7.8.50.20150109-cvs'), you will
+as `gdb-7.8.50.20150110-cvs' (or in a separate configured directory
+configured with `--srcdir=DIRNAME/gdb-7.8.50.20150110-cvs'), you will
 build all the required libraries, and then build GDB.
 
    When you have multiple hosts or targets configured in separate
@@ -8446,7 +8446,7 @@ you can use it to test your guesses on a
      Invalid configuration `i986v': machine `i986v' not recognized
 
 `config.sub' is also distributed in the GDB source directory
-(`gdb-7.8.50.20150109-cvs', for version 7.8.50.20150109-cvs).
+(`gdb-7.8.50.20150110-cvs', for version 7.8.50.20150110-cvs).
 
 
 File: gdb.info,  Node: Configure Options,  Next: System-wide configuration,  Prev: Config Names,  Up: Installing GDB
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gdb.info-6 ./gdb/doc/gdb.info-6
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gdb.info-6	2015-01-09 01:52:24.000000000 +0000
+++ ./gdb/doc/gdb.info-6	2015-01-10 01:51:14.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150109-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150110-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gdb.info-7 ./gdb/doc/gdb.info-7
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gdb.info-7	2015-01-09 01:52:24.000000000 +0000
+++ ./gdb/doc/gdb.info-7	2015-01-10 01:51:14.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150109-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150110-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gdb.info-8 ./gdb/doc/gdb.info-8
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gdb.info-8	2015-01-09 01:52:24.000000000 +0000
+++ ./gdb/doc/gdb.info-8	2015-01-10 01:51:14.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150109-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.8.50.20150110-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gdbinit.5 ./gdb/doc/gdbinit.5
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gdbinit.5	2015-01-09 01:52:25.000000000 +0000
+++ ./gdb/doc/gdbinit.5	2015-01-10 01:51:15.000000000 +0000
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GDBINIT 5"
-.TH GDBINIT 5 "2015-01-09" "gdb-7.8.50.20150109-cvs" "GNU Development Tools"
+.TH GDBINIT 5 "2015-01-10" "gdb-7.8.50.20150110-cvs" "GNU Development Tools"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gdbserver.1 ./gdb/doc/gdbserver.1
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/doc/gdbserver.1	2015-01-09 01:52:25.000000000 +0000
+++ ./gdb/doc/gdbserver.1	2015-01-10 01:51:15.000000000 +0000
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GDBSERVER 1"
-.TH GDBSERVER 1 "2015-01-09" "gdb-7.8.50.20150109-cvs" "GNU Development Tools"
+.TH GDBSERVER 1 "2015-01-10" "gdb-7.8.50.20150110-cvs" "GNU Development Tools"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/gdbserver/ChangeLog ./gdb/gdbserver/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/gdbserver/ChangeLog	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/gdbserver/ChangeLog	2015-01-10 01:48:30.000000000 +0000
@@ -1,3 +1,73 @@
+2015-01-09  Pedro Alves  <palves@redhat.com>
+
+	* linux-low.c (step_over_bkpt): Move higher up in the file.
+	(handle_extended_wait): Don't store the stop_pc here.
+	(get_stop_pc): Adjust comments and rename to ...
+	(check_stopped_by_breakpoint): ... this.  Record whether the LWP
+	stopped for a software breakpoint or hardware breakpoint.
+	(thread_still_has_status_pending_p): New function.
+	(status_pending_p_callback): Use
+	thread_still_has_status_pending_p.  If the event is no longer
+	interesting, resume the LWP.
+	(handle_tracepoints): Add assert.
+	(maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
+	(wstatus_maybe_breakpoint): New function.
+	(cancel_breakpoint): Delete function.
+	(check_stopped_by_watchpoint): New function, factored out from
+	linux_low_filter_event.
+	(lp_status_maybe_breakpoint): Delete function.
+	(linux_low_filter_event): Remove filter_ptid argument.
+	Leave thread group exits pending here.	Store the LWP's stop PC.
+	Always leave events pending.
+	(linux_wait_for_event_filtered): Pull all events out of the
+	kernel, and leave them all pending.
+	(count_events_callback, select_event_lwp_callback): Consider all
+	events.
+	(cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
+	(select_event_lwp): Only give preference to the stepping LWP in
+	all-stop mode.	Adjust comments.
+	(ignore_event): New function.
+	(linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
+	references to cancel_breakpoints.  Adjust to renames.  Also give
+	equal priority to all LWPs that have had events in non-stop mode.
+	If reporting a software breakpoint event, unadjust the LWP's PC.
+	(linux_wait): If linux_wait_1 returned an ignored event, retry.
+	(stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
+	Adjust.
+	(linux_resume_one_lwp): Store the LWP's PC.  Adjust.
+	(resume_status_pending_p): Use thread_still_has_status_pending_p.
+	(linux_stopped_by_watchpoint): Adjust.
+	(linux_target_ops): Remove reference to linux_cancel_breakpoints.
+	* linux-low.h (enum lwp_stop_reason): New.
+	(struct lwp_info) <stop_pc>: Adjust comment.
+	<stopped_by_watchpoint>: Delete field.
+	<stop_reason>: New field.
+	* linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
+	* mem-break.c (software_breakpoint_inserted_here)
+	(hardware_breakpoint_inserted_here): New function.
+	* mem-break.h (software_breakpoint_inserted_here)
+	(hardware_breakpoint_inserted_here): Declare.
+	* target.h (struct target_ops) <cancel_breakpoints>: Remove field.
+	(cancel_breakpoints): Delete.
+	* tracepoint.c (clear_installed_tracepoints, stop_tracing)
+	(upload_fast_traceframes): Remove references to
+	cancel_breakpoints.
+
+2015-01-09  Pedro Alves  <palves@redhat.com>
+
+	* thread-db.c (find_new_threads_callback): Ignore thread if the
+	kernel thread ID is -1.
+
+2015-01-09  Pedro Alves  <palves@redhat.com>
+
+	* linux-low.c (linux_attach_fail_reason_string): Move to
+	nat/linux-ptrace.c, and rename.
+	(linux_attach_lwp): Update comment.
+	(attach_proc_task_lwp_callback): New function.
+	(linux_attach): Adjust to rename and use
+	linux_proc_attach_tgid_threads.
+	(linux_attach_fail_reason_string): Delete declaration.
+
 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
 
 	* gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/gdbserver/linux-low.c ./gdb/gdbserver/linux-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/gdbserver/linux-low.c	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/gdbserver/linux-low.c	2015-01-10 01:48:30.000000000 +0000
@@ -218,9 +218,12 @@ static int linux_stopped_by_watchpoint (
 static void mark_lwp_dead (struct lwp_info *lwp, int wstat);
 static void proceed_all_lwps (void);
 static int finish_step_over (struct lwp_info *lwp);
-static CORE_ADDR get_stop_pc (struct lwp_info *lwp);
 static int kill_lwp (unsigned long lwpid, int signo);
 
+/* When the event-loop is doing a step-over, this points at the thread
+   being stepped.  */
+ptid_t step_over_bkpt;
+
 /* True if the low target can hardware single-step.  Such targets
    don't need a BREAKPOINT_REINSERT_ADDR callback.  */
 
@@ -363,6 +366,8 @@ linux_add_process (int pid, int attached
   return proc;
 }
 
+static CORE_ADDR get_pc (struct lwp_info *lwp);
+
 /* Handle a GNU/Linux extended wait response.  If we see a clone
    event, we need to add the new LWP to our list (and not report the
    trap to higher layers).  */
@@ -423,9 +428,7 @@ handle_extended_wait (struct lwp_info *e
 	 If we do get another signal, be sure not to lose it.  */
       if (WSTOPSIG (status) == SIGSTOP)
 	{
-	  if (stopping_threads != NOT_STOPPING_THREADS)
-	    new_lwp->stop_pc = get_stop_pc (new_lwp);
-	  else
+	  if (stopping_threads == NOT_STOPPING_THREADS)
 	    linux_resume_one_lwp (new_lwp, 0, 0, NULL);
 	}
       else
@@ -434,7 +437,6 @@ handle_extended_wait (struct lwp_info *e
 
 	  if (stopping_threads != NOT_STOPPING_THREADS)
 	    {
-	      new_lwp->stop_pc = get_stop_pc (new_lwp);
 	      new_lwp->status_pending_p = 1;
 	      new_lwp->status_pending = status;
 	    }
@@ -481,44 +483,96 @@ get_pc (struct lwp_info *lwp)
    The SIGTRAP could mean several things.
 
    On i386, where decr_pc_after_break is non-zero:
-   If we were single-stepping this process using PTRACE_SINGLESTEP,
-   we will get only the one SIGTRAP (even if the instruction we
-   stepped over was a breakpoint).  The value of $eip will be the
-   next instruction.
+
+   If we were single-stepping this process using PTRACE_SINGLESTEP, we
+   will get only the one SIGTRAP.  The value of $eip will be the next
+   instruction.  If the instruction we stepped over was a breakpoint,
+   we need to decrement the PC.
+
    If we continue the process using PTRACE_CONT, we will get a
    SIGTRAP when we hit a breakpoint.  The value of $eip will be
    the instruction after the breakpoint (i.e. needs to be
    decremented).  If we report the SIGTRAP to GDB, we must also
-   report the undecremented PC.  If we cancel the SIGTRAP, we
+   report the undecremented PC.  If the breakpoint is removed, we
    must resume at the decremented PC.
 
-   (Presumably, not yet tested) On a non-decr_pc_after_break machine
-   with hardware or kernel single-step:
-   If we single-step over a breakpoint instruction, our PC will
-   point at the following instruction.  If we continue and hit a
-   breakpoint instruction, our PC will point at the breakpoint
+   On a non-decr_pc_after_break machine with hardware or kernel
+   single-step:
+
+   If we either single-step a breakpoint instruction, or continue and
+   hit a breakpoint instruction, our PC will point at the breakpoint
    instruction.  */
 
-static CORE_ADDR
-get_stop_pc (struct lwp_info *lwp)
+static int
+check_stopped_by_breakpoint (struct lwp_info *lwp)
 {
-  CORE_ADDR stop_pc;
+  CORE_ADDR pc;
+  CORE_ADDR sw_breakpoint_pc;
+  struct thread_info *saved_thread;
 
   if (the_low_target.get_pc == NULL)
     return 0;
 
-  stop_pc = get_pc (lwp);
+  pc = get_pc (lwp);
+  sw_breakpoint_pc = pc - the_low_target.decr_pc_after_break;
 
-  if (WSTOPSIG (lwp->last_status) == SIGTRAP
-      && !lwp->stepping
-      && !lwp->stopped_by_watchpoint
-      && !linux_is_extended_waitstatus (lwp->last_status))
-    stop_pc -= the_low_target.decr_pc_after_break;
+  /* breakpoint_at reads from the current thread.  */
+  saved_thread = current_thread;
+  current_thread = get_lwp_thread (lwp);
 
-  if (debug_threads)
-    debug_printf ("stop pc is 0x%lx\n", (long) stop_pc);
+  /* We may have just stepped a breakpoint instruction.  E.g., in
+     non-stop mode, GDB first tells the thread A to step a range, and
+     then the user inserts a breakpoint inside the range.  In that
+     case, we need to report the breakpoint PC.  But, when we're
+     trying to step past one of our own breakpoints, that happens to
+     have been placed on top of a permanent breakpoint instruction, we
+     shouldn't adjust the PC, otherwise the program would keep
+     trapping the permanent breakpoint forever.  */
+  if ((!lwp->stepping
+       || (!ptid_equal (ptid_of (current_thread), step_over_bkpt)
+	   && lwp->stop_pc == sw_breakpoint_pc))
+      && (*the_low_target.breakpoint_at) (sw_breakpoint_pc))
+    {
+      if (debug_threads)
+	{
+	  struct thread_info *thr = get_lwp_thread (lwp);
+
+	  debug_printf ("CSBB: %s stopped by software breakpoint\n",
+			target_pid_to_str (ptid_of (thr)));
+	}
 
-  return stop_pc;
+      /* Back up the PC if necessary.  */
+      if (pc != sw_breakpoint_pc)
+        {
+	  struct regcache *regcache
+	    = get_thread_regcache (current_thread, 1);
+	  (*the_low_target.set_pc) (regcache, sw_breakpoint_pc);
+	}
+
+      lwp->stop_pc = sw_breakpoint_pc;
+      lwp->stop_reason = LWP_STOPPED_BY_SW_BREAKPOINT;
+      current_thread = saved_thread;
+      return 1;
+    }
+
+  if (hardware_breakpoint_inserted_here (pc))
+    {
+      if (debug_threads)
+	{
+	  struct thread_info *thr = get_lwp_thread (lwp);
+
+	  debug_printf ("CSBB: %s stopped by hardware breakpoint\n",
+			target_pid_to_str (ptid_of (thr)));
+	}
+
+      lwp->stop_pc = pc;
+      lwp->stop_reason = LWP_STOPPED_BY_HW_BREAKPOINT;
+      current_thread = saved_thread;
+      return 1;
+    }
+
+  current_thread = saved_thread;
+  return 0;
 }
 
 static struct lwp_info *
@@ -631,31 +685,8 @@ linux_create_inferior (char *program, ch
   return pid;
 }
 
-char *
-linux_attach_fail_reason_string (ptid_t ptid, int err)
-{
-  static char *reason_string;
-  struct buffer buffer;
-  char *warnings;
-  long lwpid = ptid_get_lwp (ptid);
-
-  xfree (reason_string);
-
-  buffer_init (&buffer);
-  linux_ptrace_attach_fail_reason (lwpid, &buffer);
-  buffer_grow_str0 (&buffer, "");
-  warnings = buffer_finish (&buffer);
-  if (warnings[0] != '\0')
-    reason_string = xstrprintf ("%s (%d), %s",
-				strerror (err), err, warnings);
-  else
-    reason_string = xstrprintf ("%s (%d)",
-				strerror (err), err);
-  xfree (warnings);
-  return reason_string;
-}
-
-/* Attach to an inferior process.  */
+/* Attach to an inferior process.  Returns 0 on success, ERRNO on
+   error.  */
 
 int
 linux_attach_lwp (ptid_t ptid)
@@ -739,6 +770,50 @@ linux_attach_lwp (ptid_t ptid)
   return 0;
 }
 
+/* Callback for linux_proc_attach_tgid_threads.  Attach to PTID if not
+   already attached.  Returns true if a new LWP is found, false
+   otherwise.  */
+
+static int
+attach_proc_task_lwp_callback (ptid_t ptid)
+{
+  /* Is this a new thread?  */
+  if (find_thread_ptid (ptid) == NULL)
+    {
+      int lwpid = ptid_get_lwp (ptid);
+      int err;
+
+      if (debug_threads)
+	debug_printf ("Found new lwp %d\n", lwpid);
+
+      err = linux_attach_lwp (ptid);
+
+      /* Be quiet if we simply raced with the thread exiting.  EPERM
+	 is returned if the thread's task still exists, and is marked
+	 as exited or zombie, as well as other conditions, so in that
+	 case, confirm the status in /proc/PID/status.  */
+      if (err == ESRCH
+	  || (err == EPERM && linux_proc_pid_is_gone (lwpid)))
+	{
+	  if (debug_threads)
+	    {
+	      debug_printf ("Cannot attach to lwp %d: "
+			    "thread is gone (%d: %s)\n",
+			    lwpid, err, strerror (err));
+	    }
+	}
+      else if (err != 0)
+	{
+	  warning (_("Cannot attach to lwp %d: %s"),
+		   lwpid,
+		   linux_ptrace_attach_fail_reason_string (ptid, err));
+	}
+
+      return 1;
+    }
+  return 0;
+}
+
 /* Attach to PID.  If PID is the tgid, attach to it and all
    of its threads.  */
 
@@ -753,7 +828,7 @@ linux_attach (unsigned long pid)
   err = linux_attach_lwp (ptid);
   if (err != 0)
     error ("Cannot attach to process %ld: %s",
-	   pid, linux_attach_fail_reason_string (ptid, err));
+	   pid, linux_ptrace_attach_fail_reason_string (ptid, err));
 
   linux_add_process (pid, 1);
 
@@ -767,75 +842,16 @@ linux_attach (unsigned long pid)
       thread->last_resume_kind = resume_stop;
     }
 
-  if (linux_proc_get_tgid (pid) == pid)
-    {
-      DIR *dir;
-      char pathname[128];
-
-      sprintf (pathname, "/proc/%ld/task", pid);
-
-      dir = opendir (pathname);
-
-      if (!dir)
-	{
-	  fprintf (stderr, "Could not open /proc/%ld/task.\n", pid);
-	  fflush (stderr);
-	}
-      else
-	{
-	  /* At this point we attached to the tgid.  Scan the task for
-	     existing threads.  */
-	  int new_threads_found;
-	  int iterations = 0;
-
-	  while (iterations < 2)
-	    {
-	      struct dirent *dp;
-
-	      new_threads_found = 0;
-	      /* Add all the other threads.  While we go through the
-		 threads, new threads may be spawned.  Cycle through
-		 the list of threads until we have done two iterations without
-		 finding new threads.  */
-	      while ((dp = readdir (dir)) != NULL)
-		{
-		  unsigned long lwp;
-		  ptid_t ptid;
-
-		  /* Fetch one lwp.  */
-		  lwp = strtoul (dp->d_name, NULL, 10);
-
-		  ptid = ptid_build (pid, lwp, 0);
-
-		  /* Is this a new thread?  */
-		  if (lwp != 0 && find_thread_ptid (ptid) == NULL)
-		    {
-		      int err;
-
-		      if (debug_threads)
-			debug_printf ("Found new lwp %ld\n", lwp);
-
-		      err = linux_attach_lwp (ptid);
-		      if (err != 0)
-			warning ("Cannot attach to lwp %ld: %s",
-				 lwp,
-				 linux_attach_fail_reason_string (ptid, err));
-
-		      new_threads_found++;
-		    }
-		}
-
-	      if (!new_threads_found)
-		iterations++;
-	      else
-		iterations = 0;
-
-	      rewinddir (dir);
-	    }
-	  closedir (dir);
-	}
-    }
-
+  /* We must attach to every LWP.  If /proc is mounted, use that to
+     find them now.  On the one hand, the inferior may be using raw
+     clone instead of using pthreads.  On the other hand, even if it
+     is using pthreads, GDB may not be connected yet (thread_db needs
+     to do symbol lookups, through qSymbol).  Also, thread_db walks
+     structures in the inferior's address space to find the list of
+     threads/LWPs, and those structures may well be corrupted.  Note
+     that once thread_db is loaded, we'll still use it to list threads
+     and associate pthread info with each LWP.  */
+  linux_proc_attach_tgid_threads (pid, attach_proc_task_lwp_callback);
   return 0;
 }
 
@@ -1235,12 +1251,83 @@ linux_thread_alive (ptid_t ptid)
     return 0;
 }
 
+/* Return 1 if this lwp still has an interesting status pending.  If
+   not (e.g., it had stopped for a breakpoint that is gone), return
+   false.  */
+
+static int
+thread_still_has_status_pending_p (struct thread_info *thread)
+{
+  struct lwp_info *lp = get_thread_lwp (thread);
+
+  if (!lp->status_pending_p)
+    return 0;
+
+  /* If we got a `vCont;t', but we haven't reported a stop yet, do
+     report any status pending the LWP may have.  */
+  if (thread->last_resume_kind == resume_stop
+      && thread->last_status.kind != TARGET_WAITKIND_IGNORE)
+    return 0;
+
+  if (thread->last_resume_kind != resume_stop
+      && (lp->stop_reason == LWP_STOPPED_BY_SW_BREAKPOINT
+	  || lp->stop_reason == LWP_STOPPED_BY_HW_BREAKPOINT))
+    {
+      struct thread_info *saved_thread;
+      CORE_ADDR pc;
+      int discard = 0;
+
+      gdb_assert (lp->last_status != 0);
+
+      pc = get_pc (lp);
+
+      saved_thread = current_thread;
+      current_thread = thread;
+
+      if (pc != lp->stop_pc)
+	{
+	  if (debug_threads)
+	    debug_printf ("PC of %ld changed\n",
+			  lwpid_of (thread));
+	  discard = 1;
+	}
+      else if (lp->stop_reason == LWP_STOPPED_BY_SW_BREAKPOINT
+	       && !(*the_low_target.breakpoint_at) (pc))
+	{
+	  if (debug_threads)
+	    debug_printf ("previous SW breakpoint of %ld gone\n",
+			  lwpid_of (thread));
+	  discard = 1;
+	}
+      else if (lp->stop_reason == LWP_STOPPED_BY_HW_BREAKPOINT
+	       && !hardware_breakpoint_inserted_here (pc))
+	{
+	  if (debug_threads)
+	    debug_printf ("previous HW breakpoint of %ld gone\n",
+			  lwpid_of (thread));
+	  discard = 1;
+	}
+
+      current_thread = saved_thread;
+
+      if (discard)
+	{
+	  if (debug_threads)
+	    debug_printf ("discarding pending breakpoint status\n");
+	  lp->status_pending_p = 0;
+	  return 0;
+	}
+    }
+
+  return 1;
+}
+
 /* Return 1 if this lwp has an interesting status pending.  */
 static int
 status_pending_p_callback (struct inferior_list_entry *entry, void *arg)
 {
   struct thread_info *thread = (struct thread_info *) entry;
-  struct lwp_info *lwp = get_thread_lwp (thread);
+  struct lwp_info *lp = get_thread_lwp (thread);
   ptid_t ptid = * (ptid_t *) arg;
 
   /* Check if we're only interested in events from a specific process
@@ -1249,13 +1336,14 @@ status_pending_p_callback (struct inferi
       && ptid_get_pid (ptid) != ptid_get_pid (thread->entry.id))
     return 0;
 
-  /* If we got a `vCont;t', but we haven't reported a stop yet, do
-     report any status pending the LWP may have.  */
-  if (thread->last_resume_kind == resume_stop
-      && thread->last_status.kind != TARGET_WAITKIND_IGNORE)
-    return 0;
+  if (lp->status_pending_p
+      && !thread_still_has_status_pending_p (thread))
+    {
+      linux_resume_one_lwp (lp, lp->stepping, GDB_SIGNAL_0, NULL);
+      return 0;
+    }
 
-  return lwp->status_pending_p;
+  return lp->status_pending_p;
 }
 
 static int
@@ -1401,6 +1489,8 @@ handle_tracepoints (struct lwp_info *lwp
   struct thread_info *tinfo = get_lwp_thread (lwp);
   int tpoint_related_event = 0;
 
+  gdb_assert (lwp->suspended == 0);
+
   /* If this tracepoint hit causes a tracing stop, we'll immediately
      uninsert tracepoints.  To do this, we temporarily pause all
      threads, unpatch away, and then unpause threads.  We need to make
@@ -1566,7 +1656,6 @@ maybe_move_out_of_jump_pad (struct lwp_i
 			      "stopping all threads momentarily.\n");
 
 	      stop_all_lwps (1, lwp);
-	      cancel_breakpoints ();
 
 	      delete_breakpoint (lwp->exit_jump_pad_bkpt);
 	      lwp->exit_jump_pad_bkpt = NULL;
@@ -1692,65 +1781,59 @@ dequeue_one_deferred_signal (struct lwp_
   return 0;
 }
 
-/* Arrange for a breakpoint to be hit again later.  We don't keep the
-   SIGTRAP status and don't forward the SIGTRAP signal to the LWP.  We
-   will handle the current event, eventually we will resume this LWP,
-   and this breakpoint will trap again.  */
+/* Return true if the event in LP may be caused by breakpoint.  */
 
 static int
-cancel_breakpoint (struct lwp_info *lwp)
+wstatus_maybe_breakpoint (int wstatus)
 {
-  struct thread_info *saved_thread;
+  return (WIFSTOPPED (wstatus)
+	  && (WSTOPSIG (wstatus) == SIGTRAP
+	      /* SIGILL and SIGSEGV are also treated as traps in case a
+		 breakpoint is inserted at the current PC.  */
+	      || WSTOPSIG (wstatus) == SIGILL
+	      || WSTOPSIG (wstatus) == SIGSEGV));
+}
 
-  /* There's nothing to do if we don't support breakpoints.  */
-  if (!supports_breakpoints ())
-    return 0;
+/* Fetch the possibly triggered data watchpoint info and store it in
+   CHILD.
 
-  /* breakpoint_at reads from current inferior.  */
-  saved_thread = current_thread;
-  current_thread = get_lwp_thread (lwp);
+   On some archs, like x86, that use debug registers to set
+   watchpoints, it's possible that the way to know which watched
+   address trapped, is to check the register that is used to select
+   which address to watch.  Problem is, between setting the watchpoint
+   and reading back which data address trapped, the user may change
+   the set of watchpoints, and, as a consequence, GDB changes the
+   debug registers in the inferior.  To avoid reading back a stale
+   stopped-data-address when that happens, we cache in LP the fact
+   that a watchpoint trapped, and the corresponding data address, as
+   soon as we see CHILD stop with a SIGTRAP.  If GDB changes the debug
+   registers meanwhile, we have the cached data we can rely on.  */
 
-  if ((*the_low_target.breakpoint_at) (lwp->stop_pc))
+static int
+check_stopped_by_watchpoint (struct lwp_info *child)
+{
+  if (the_low_target.stopped_by_watchpoint != NULL)
     {
-      if (debug_threads)
-	debug_printf ("CB: Push back breakpoint for %s\n",
-		      target_pid_to_str (ptid_of (current_thread)));
+      struct thread_info *saved_thread;
 
-      /* Back up the PC if necessary.  */
-      if (the_low_target.decr_pc_after_break)
+      saved_thread = current_thread;
+      current_thread = get_lwp_thread (child);
+
+      if (the_low_target.stopped_by_watchpoint ())
 	{
-	  struct regcache *regcache
-	    = get_thread_regcache (current_thread, 1);
-	  (*the_low_target.set_pc) (regcache, lwp->stop_pc);
+	  child->stop_reason = LWP_STOPPED_BY_WATCHPOINT;
+
+	  if (the_low_target.stopped_data_address != NULL)
+	    child->stopped_data_address
+	      = the_low_target.stopped_data_address ();
+	  else
+	    child->stopped_data_address = 0;
 	}
 
       current_thread = saved_thread;
-      return 1;
-    }
-  else
-    {
-      if (debug_threads)
-	debug_printf ("CB: No breakpoint found at %s for [%s]\n",
-		      paddress (lwp->stop_pc),
-		      target_pid_to_str (ptid_of (current_thread)));
     }
 
-  current_thread = saved_thread;
-  return 0;
-}
-
-/* Return true if the event in LP may be caused by breakpoint.  */
-
-static int
-lp_status_maybe_breakpoint (struct lwp_info *lp)
-{
-  return (lp->status_pending_p
-	  && WIFSTOPPED (lp->status_pending)
-	  && (WSTOPSIG (lp->status_pending) == SIGTRAP
-	      /* SIGILL and SIGSEGV are also treated as traps in case a
-		 breakpoint is inserted at the current PC.  */
-	      || WSTOPSIG (lp->status_pending) == SIGILL
-	      || WSTOPSIG (lp->status_pending) == SIGSEGV));
+  return child->stop_reason == LWP_STOPPED_BY_WATCHPOINT;
 }
 
 /* Do low-level handling of the event, and check if we should go on
@@ -1758,10 +1841,11 @@ lp_status_maybe_breakpoint (struct lwp_i
    NULL otherwise.  */
 
 static struct lwp_info *
-linux_low_filter_event (ptid_t filter_ptid, int lwpid, int wstat)
+linux_low_filter_event (int lwpid, int wstat)
 {
   struct lwp_info *child;
   struct thread_info *thread;
+  int have_stop_pc = 0;
 
   child = find_lwp_pid (pid_to_ptid (lwpid));
 
@@ -1783,6 +1867,35 @@ linux_low_filter_event (ptid_t filter_pt
 
   child->last_status = wstat;
 
+  /* Check if the thread has exited.  */
+  if ((WIFEXITED (wstat) || WIFSIGNALED (wstat)))
+    {
+      if (debug_threads)
+	debug_printf ("LLFE: %d exited.\n", lwpid);
+      if (num_lwps (pid_of (thread)) > 1)
+	{
+
+	  /* If there is at least one more LWP, then the exit signal was
+	     not the end of the debugged application and should be
+	     ignored.  */
+	  delete_lwp (child);
+	  return NULL;
+	}
+      else
+	{
+	  /* This was the last lwp in the process.  Since events are
+	     serialized to GDB core, and we can't report this one
+	     right now, but GDB core and the other target layers will
+	     want to be notified about the exit code/signal, leave the
+	     status pending for the next time we're able to report
+	     it.  */
+	  mark_lwp_dead (child, wstat);
+	  return child;
+	}
+    }
+
+  gdb_assert (WIFSTOPPED (wstat));
+
   if (WIFSTOPPED (wstat))
     {
       struct process_info *proc;
@@ -1807,75 +1920,6 @@ linux_low_filter_event (ptid_t filter_pt
 	}
     }
 
-  /* Store the STOP_PC, with adjustment applied.  This depends on the
-     architecture being defined already (so that CHILD has a valid
-     regcache), and on LAST_STATUS being set (to check for SIGTRAP or
-     not).  */
-  if (WIFSTOPPED (wstat))
-    {
-      if (debug_threads
-	  && the_low_target.get_pc != NULL)
-	{
-	  struct thread_info *saved_thread;
-	  struct regcache *regcache;
-	  CORE_ADDR pc;
-
-	  saved_thread = current_thread;
-	  current_thread = thread;
-	  regcache = get_thread_regcache (current_thread, 1);
-	  pc = (*the_low_target.get_pc) (regcache);
-	  debug_printf ("linux_low_filter_event: pc is 0x%lx\n", (long) pc);
-	  current_thread = saved_thread;
-	}
-
-      child->stop_pc = get_stop_pc (child);
-    }
-
-  /* Fetch the possibly triggered data watchpoint info and store it in
-     CHILD.
-
-     On some archs, like x86, that use debug registers to set
-     watchpoints, it's possible that the way to know which watched
-     address trapped, is to check the register that is used to select
-     which address to watch.  Problem is, between setting the
-     watchpoint and reading back which data address trapped, the user
-     may change the set of watchpoints, and, as a consequence, GDB
-     changes the debug registers in the inferior.  To avoid reading
-     back a stale stopped-data-address when that happens, we cache in
-     LP the fact that a watchpoint trapped, and the corresponding data
-     address, as soon as we see CHILD stop with a SIGTRAP.  If GDB
-     changes the debug registers meanwhile, we have the cached data we
-     can rely on.  */
-
-  if (WIFSTOPPED (wstat) && WSTOPSIG (wstat) == SIGTRAP)
-    {
-      if (the_low_target.stopped_by_watchpoint == NULL)
-	{
-	  child->stopped_by_watchpoint = 0;
-	}
-      else
-	{
-	  struct thread_info *saved_thread;
-
-	  saved_thread = current_thread;
-	  current_thread = thread;
-
-	  child->stopped_by_watchpoint
-	    = the_low_target.stopped_by_watchpoint ();
-
-	  if (child->stopped_by_watchpoint)
-	    {
-	      if (the_low_target.stopped_data_address != NULL)
-		child->stopped_data_address
-		  = the_low_target.stopped_data_address ();
-	      else
-		child->stopped_data_address = 0;
-	    }
-
-	  current_thread = saved_thread;
-	}
-    }
-
   if (WIFSTOPPED (wstat) && child->must_set_ptrace_flags)
     {
       struct process_info *proc = find_process_pid (pid_of (thread));
@@ -1884,13 +1928,28 @@ linux_low_filter_event (ptid_t filter_pt
       child->must_set_ptrace_flags = 0;
     }
 
+  /* Be careful to not overwrite stop_pc until
+     check_stopped_by_breakpoint is called.  */
   if (WIFSTOPPED (wstat) && WSTOPSIG (wstat) == SIGTRAP
       && linux_is_extended_waitstatus (wstat))
     {
+      child->stop_pc = get_pc (child);
       handle_extended_wait (child, wstat);
       return NULL;
     }
 
+  if (WIFSTOPPED (wstat) && WSTOPSIG (wstat) == SIGTRAP
+      && check_stopped_by_watchpoint (child))
+    ;
+  else if (WIFSTOPPED (wstat) && wstatus_maybe_breakpoint (wstat))
+    {
+      if (check_stopped_by_breakpoint (child))
+	have_stop_pc = 1;
+    }
+
+  if (!have_stop_pc)
+    child->stop_pc = get_pc (child);
+
   if (WIFSTOPPED (wstat) && WSTOPSIG (wstat) == SIGSTOP
       && child->stop_expected)
     {
@@ -1906,7 +1965,7 @@ linux_low_filter_event (ptid_t filter_pt
       else if (stopping_threads != NOT_STOPPING_THREADS)
 	{
 	  /* Stopping threads.  We don't want this SIGSTOP to end up
-	     pending in the FILTER_PTID handling below.  */
+	     pending.  */
 	  return NULL;
 	}
       else
@@ -1917,79 +1976,11 @@ linux_low_filter_event (ptid_t filter_pt
 	}
     }
 
-    /* Check if the thread has exited.  */
-  if ((WIFEXITED (wstat) || WIFSIGNALED (wstat))
-      && num_lwps (pid_of (thread)) > 1)
-    {
-      if (debug_threads)
-	debug_printf ("LLW: %d exited.\n", lwpid);
-
-	 /* If there is at least one more LWP, then the exit signal
-	    was not the end of the debugged application and should be
-	    ignored.  */
-      delete_lwp (child);
-      return NULL;
-    }
-
-  if (!ptid_match (ptid_of (thread), filter_ptid))
-    {
-      if (debug_threads)
-	debug_printf ("LWP %d got an event %06x, leaving pending.\n",
-		      lwpid, wstat);
-
-      if (WIFSTOPPED (wstat))
-	{
-	  child->status_pending_p = 1;
-	  child->status_pending = wstat;
-
-	  if (WSTOPSIG (wstat) != SIGSTOP)
-	    {
-	      /* Cancel breakpoint hits.  The breakpoint may be
-		 removed before we fetch events from this process to
-		 report to the core.  It is best not to assume the
-		 moribund breakpoints heuristic always handles these
-		 cases --- it could be too many events go through to
-		 the core before this one is handled.  All-stop always
-		 cancels breakpoint hits in all threads.  */
-	      if (non_stop
-		  && lp_status_maybe_breakpoint (child)
-		  && cancel_breakpoint (child))
-		{
-		  /* Throw away the SIGTRAP.  */
-		  child->status_pending_p = 0;
-
-		  if (debug_threads)
-		    debug_printf ("LLW: LWP %d hit a breakpoint while"
-				  " waiting for another process;"
-				  " cancelled it\n", lwpid);
-		}
-	    }
-	}
-      else if (WIFEXITED (wstat) || WIFSIGNALED (wstat))
-	{
-	  if (debug_threads)
-	    debug_printf ("LLWE: process %d exited while fetching "
-			  "event from another LWP\n", lwpid);
-
-	  /* This was the last lwp in the process.  Since events are
-	     serialized to GDB core, and we can't report this one
-	     right now, but GDB core and the other target layers will
-	     want to be notified about the exit code/signal, leave the
-	     status pending for the next time we're able to report
-	     it.  */
-	  mark_lwp_dead (child, wstat);
-	}
-
-      return NULL;
-    }
-
+  child->status_pending_p = 1;
+  child->status_pending = wstat;
   return child;
 }
 
-/* When the event-loop is doing a step-over, this points at the thread
-   being stepped.  */
-ptid_t step_over_bkpt;
-
 /* Wait for an event from child(ren) WAIT_PTID, and return any that
    match FILTER_PTID (leaving others pending).  The PTIDs can be:
    minus_one_ptid, to specify any child; a pid PTID, specifying all
@@ -2079,6 +2070,9 @@ linux_wait_for_event_filtered (ptid_t wa
   sigfillset (&block_mask);
   sigprocmask (SIG_BLOCK, &block_mask, &prev_mask);
 
+  /* Always pull all events out of the kernel.  We'll randomly select
+     an event LWP out of all that have events, to prevent
+     starvation.  */
   while (event_child == NULL)
     {
       pid_t ret = 0;
@@ -2111,20 +2105,28 @@ linux_wait_for_event_filtered (ptid_t wa
 			    (long) ret, status_to_str (*wstatp));
 	    }
 
-	  event_child = linux_low_filter_event (filter_ptid,
-						ret, *wstatp);
-	  if (event_child != NULL)
-	    {
-	      /* We got an event to report to the core.  */
-	      event_thread = get_lwp_thread (event_child);
-	      break;
-	    }
-
+	  /* Filter all events.  IOW, leave all events pending.  We'll
+	     randomly select an event LWP out of all that have events
+	     below.  */
+	  linux_low_filter_event (ret, *wstatp);
 	  /* Retry until nothing comes out of waitpid.  A single
 	     SIGCHLD can indicate more than one child stopped.  */
 	  continue;
 	}
 
+      /* Now that we've pulled all events out of the kernel, check if
+	 there's any LWP with a status to report to the core.  */
+      event_thread = (struct thread_info *)
+	find_inferior (&all_threads, status_pending_p_callback, &filter_ptid);
+      if (event_thread != NULL)
+	{
+	  event_child = get_thread_lwp (event_thread);
+	  *wstatp = event_child->status_pending;
+	  event_child->status_pending_p = 0;
+	  event_child->status_pending = 0;
+	  break;
+	}
+
       /* Check for zombie thread group leaders.  Those can't be reaped
 	 until all other threads in the thread group are.  */
       check_zombie_leaders ();
@@ -2204,17 +2206,14 @@ static int
 count_events_callback (struct inferior_list_entry *entry, void *data)
 {
   struct thread_info *thread = (struct thread_info *) entry;
-  struct lwp_info *lp = get_thread_lwp (thread);
   int *count = data;
 
   gdb_assert (count != NULL);
 
-  /* Count only resumed LWPs that have a SIGTRAP event pending that
-     should be reported to GDB.  */
+  /* Count only resumed LWPs that have an event pending. */
   if (thread->last_status.kind == TARGET_WAITKIND_IGNORE
       && thread->last_resume_kind != resume_stop
-      && lp_status_maybe_breakpoint (lp)
-      && !breakpoint_inserted_here (lp->stop_pc))
+      && thread->status_pending_p)
     (*count)++;
 
   return 0;
@@ -2243,62 +2242,20 @@ static int
 select_event_lwp_callback (struct inferior_list_entry *entry, void *data)
 {
   struct thread_info *thread = (struct thread_info *) entry;
-  struct lwp_info *lp = get_thread_lwp (thread);
   int *selector = data;
 
   gdb_assert (selector != NULL);
 
-  /* Select only resumed LWPs that have a SIGTRAP event pending. */
+  /* Select only resumed LWPs that have an event pending. */
   if (thread->last_resume_kind != resume_stop
       && thread->last_status.kind == TARGET_WAITKIND_IGNORE
-      && lp_status_maybe_breakpoint (lp)
-      && !breakpoint_inserted_here (lp->stop_pc))
+      && thread->status_pending_p)
     if ((*selector)-- == 0)
       return 1;
 
   return 0;
 }
 
-static int
-cancel_breakpoints_callback (struct inferior_list_entry *entry, void *data)
-{
-  struct thread_info *thread = (struct thread_info *) entry;
-  struct lwp_info *lp = get_thread_lwp (thread);
-  struct lwp_info *event_lp = data;
-
-  /* Leave the LWP that has been elected to receive a SIGTRAP alone.  */
-  if (lp == event_lp)
-    return 0;
-
-  /* If a LWP other than the LWP that we're reporting an event for has
-     hit a GDB breakpoint (as opposed to some random trap signal),
-     then just arrange for it to hit it again later.  We don't keep
-     the SIGTRAP status and don't forward the SIGTRAP signal to the
-     LWP.  We will handle the current event, eventually we will resume
-     all LWPs, and this one will get its breakpoint trap again.
-
-     If we do not do this, then we run the risk that the user will
-     delete or disable the breakpoint, but the LWP will have already
-     tripped on it.  */
-
-  if (thread->last_resume_kind != resume_stop
-      && thread->last_status.kind == TARGET_WAITKIND_IGNORE
-      && lp_status_maybe_breakpoint (lp)
-      && !lp->stepping
-      && !lp->stopped_by_watchpoint
-      && cancel_breakpoint (lp))
-    /* Throw away the SIGTRAP.  */
-    lp->status_pending_p = 0;
-
-  return 0;
-}
-
-static void
-linux_cancel_breakpoints (void)
-{
-  find_inferior (&all_threads, cancel_breakpoints_callback, NULL);
-}
-
 /* Select one LWP out of those that have events pending.  */
 
 static void
@@ -2306,20 +2263,30 @@ select_event_lwp (struct lwp_info **orig
 {
   int num_events = 0;
   int random_selector;
-  struct thread_info *event_thread;
+  struct thread_info *event_thread = NULL;
 
-  /* Give preference to any LWP that is being single-stepped.  */
-  event_thread
-    = (struct thread_info *) find_inferior (&all_threads,
-					    select_singlestep_lwp_callback,
-					    NULL);
-  if (event_thread != NULL)
+  /* In all-stop, give preference to the LWP that is being
+     single-stepped.  There will be at most one, and it's the LWP that
+     the core is most interested in.  If we didn't do this, then we'd
+     have to handle pending step SIGTRAPs somehow in case the core
+     later continues the previously-stepped thread, otherwise we'd
+     report the pending SIGTRAP, and the core, not having stepped the
+     thread, wouldn't understand what the trap was for, and therefore
+     would report it to the user as a random signal.  */
+  if (!non_stop)
     {
-      if (debug_threads)
-	debug_printf ("SEL: Select single-step %s\n",
-		      target_pid_to_str (ptid_of (event_thread)));
+      event_thread
+	= (struct thread_info *) find_inferior (&all_threads,
+						select_singlestep_lwp_callback,
+						NULL);
+      if (event_thread != NULL)
+	{
+	  if (debug_threads)
+	    debug_printf ("SEL: Select single-step %s\n",
+			  target_pid_to_str (ptid_of (event_thread)));
+	}
     }
-  else
+  if (event_thread == NULL)
     {
       /* No single-stepping LWP.  Select one at random, out of those
          which have had SIGTRAP events.  */
@@ -2486,6 +2453,23 @@ linux_stabilize_threads (void)
     }
 }
 
+static void async_file_mark (void);
+
+/* Convenience function that is called when the kernel reports an
+   event that is not passed out to GDB.  */
+
+static ptid_t
+ignore_event (struct target_waitstatus *ourstatus)
+{
+  /* If we got an event, there may still be others, as a single
+     SIGCHLD can indicate more than one child stopped.  This forces
+     another target_wait call.  */
+  async_file_mark ();
+
+  ourstatus->kind = TARGET_WAITKIND_IGNORE;
+  return null_ptid;
+}
+
 /* Wait for process, returns status.  */
 
 static ptid_t
@@ -2514,7 +2498,6 @@ linux_wait_1 (ptid_t ptid,
   if (target_options & TARGET_WNOHANG)
     options |= WNOHANG;
 
-retry:
   bp_explains_trap = 0;
   trace_event = 0;
   in_step_range = 0;
@@ -2679,7 +2662,8 @@ retry:
 			  WSTOPSIG (w), lwpid_of (current_thread));
 
 	  linux_resume_one_lwp (event_child, 0, 0, NULL);
-	  goto retry;
+
+	  return ignore_event (ourstatus);
 	}
     }
 
@@ -2713,7 +2697,6 @@ retry:
 		 care of while the breakpoint is still
 		 inserted.  */
 	      stop_all_lwps (1, event_child);
-	      cancel_breakpoints ();
 
 	      delete_breakpoint (event_child->exit_jump_pad_bkpt);
 	      event_child->exit_jump_pad_bkpt = NULL;
@@ -2797,7 +2780,7 @@ retry:
 	info_p = NULL;
       linux_resume_one_lwp (event_child, event_child->stepping,
 			    WSTOPSIG (w), info_p);
-      goto retry;
+      return ignore_event (ourstatus);
     }
 
   /* Note that all addresses are always "out of the step range" when
@@ -2816,7 +2799,7 @@ retry:
   report_to_gdb = (!maybe_internal_trap
 		   || (current_thread->last_resume_kind == resume_step
 		       && !in_step_range)
-		   || event_child->stopped_by_watchpoint
+		   || event_child->stop_reason == LWP_STOPPED_BY_WATCHPOINT
 		   || (!step_over_finished && !in_step_range
 		       && !bp_explains_trap && !trace_event)
 		   || (gdb_breakpoint_here (event_child->stop_pc)
@@ -2868,7 +2851,7 @@ retry:
 	unsuspend_all_lwps (event_child);
 
       proceed_all_lwps ();
-      goto retry;
+      return ignore_event (ourstatus);
     }
 
   if (debug_threads)
@@ -2880,9 +2863,9 @@ retry:
 	  else if (!lwp_in_step_range (event_child))
 	    debug_printf ("Out of step range, reporting event.\n");
 	}
-      if (event_child->stopped_by_watchpoint)
+      if (event_child->stop_reason == LWP_STOPPED_BY_WATCHPOINT)
 	debug_printf ("Stopped by watchpoint.\n");
-      if (gdb_breakpoint_here (event_child->stop_pc))
+      else if (gdb_breakpoint_here (event_child->stop_pc))
 	debug_printf ("Stopped by GDB breakpoint.\n");
       if (debug_threads)
 	debug_printf ("Hit a non-gdbserver trap event.\n");
@@ -2890,10 +2873,11 @@ retry:
 
   /* Alright, we're going to report a stop.  */
 
-  if (!non_stop && !stabilizing_threads)
+  if (!stabilizing_threads)
     {
       /* In all-stop, stop all threads.  */
-      stop_all_lwps (0, NULL);
+      if (!non_stop)
+	stop_all_lwps (0, NULL);
 
       /* If we're not waiting for a specific LWP, choose an event LWP
 	 from among those that have had events.  Giving equal priority
@@ -2913,23 +2897,33 @@ retry:
 	  w = event_child->status_pending;
 	}
 
-      /* Now that we've selected our final event LWP, cancel any
-	 breakpoints in other LWPs that have hit a GDB breakpoint.
-	 See the comment in cancel_breakpoints_callback to find out
-	 why.  */
-      find_inferior (&all_threads, cancel_breakpoints_callback, event_child);
-
-      /* If we were going a step-over, all other threads but the stepping one
-	 had been paused in start_step_over, with their suspend counts
-	 incremented.  We don't want to do a full unstop/unpause, because we're
-	 in all-stop mode (so we want threads stopped), but we still need to
-	 unsuspend the other threads, to decrement their `suspended' count
-	 back.  */
       if (step_over_finished)
-	unsuspend_all_lwps (event_child);
+	{
+	  if (!non_stop)
+	    {
+	      /* If we were doing a step-over, all other threads but
+		 the stepping one had been paused in start_step_over,
+		 with their suspend counts incremented.  We don't want
+		 to do a full unstop/unpause, because we're in
+		 all-stop mode (so we want threads stopped), but we
+		 still need to unsuspend the other threads, to
+		 decrement their `suspended' count back.  */
+	      unsuspend_all_lwps (event_child);
+	    }
+	  else
+	    {
+	      /* If we just finished a step-over, then all threads had
+		 been momentarily paused.  In all-stop, that's fine,
+		 we want threads stopped by now anyway.  In non-stop,
+		 we need to re-resume threads that GDB wanted to be
+		 running.  */
+	      unstop_all_lwps (1, event_child);
+	    }
+	}
 
       /* Stabilize threads (move out of jump pads).  */
-      stabilize_threads ();
+      if (!non_stop)
+	stabilize_threads ();
     }
   else
     {
@@ -2943,6 +2937,20 @@ retry:
 
   ourstatus->kind = TARGET_WAITKIND_STOPPED;
 
+  /* Now that we've selected our final event LWP, un-adjust its PC if
+     it was a software breakpoint.  */
+  if (event_child->stop_reason == LWP_STOPPED_BY_SW_BREAKPOINT)
+    {
+      int decr_pc = the_low_target.decr_pc_after_break;
+
+      if (decr_pc != 0)
+	{
+	  struct regcache *regcache
+	    = get_thread_regcache (current_thread, 1);
+	  (*the_low_target.set_pc) (regcache, event_child->stop_pc + decr_pc);
+	}
+    }
+
   if (current_thread->last_resume_kind == resume_stop
       && WSTOPSIG (w) == SIGSTOP)
     {
@@ -3014,7 +3022,13 @@ linux_wait (ptid_t ptid,
   if (target_is_async_p ())
     async_file_flush ();
 
-  event_ptid = linux_wait_1 (ptid, ourstatus, target_options);
+  do
+    {
+      event_ptid = linux_wait_1 (ptid, ourstatus, target_options);
+    }
+  while ((target_options & TARGET_WNOHANG) == 0
+	 && ptid_equal (event_ptid, null_ptid)
+	 && ourstatus->kind == TARGET_WAITKIND_IGNORE);
 
   /* If at least one stop was reported, there may be more.  A single
      SIGCHLD can signal more than one child stop.  */
@@ -3202,7 +3216,7 @@ stuck_in_jump_pad_callback (struct infer
   return (supports_fast_tracepoints ()
 	  && agent_loaded_p ()
 	  && (gdb_breakpoint_here (lwp->stop_pc)
-	      || lwp->stopped_by_watchpoint
+	      || lwp->stop_reason == LWP_STOPPED_BY_WATCHPOINT
 	      || thread->last_resume_kind == resume_step)
 	  && linux_fast_tracepoint_collecting (lwp, NULL));
 }
@@ -3221,7 +3235,7 @@ move_out_of_jump_pad_callback (struct in
 
   /* Allow debugging the jump pad, gdb_collect, etc.  */
   if (!gdb_breakpoint_here (lwp->stop_pc)
-      && !lwp->stopped_by_watchpoint
+      && lwp->stop_reason != LWP_STOPPED_BY_WATCHPOINT
       && thread->last_resume_kind != resume_step
       && maybe_move_out_of_jump_pad (lwp, wstat))
     {
@@ -3445,11 +3459,17 @@ linux_resume_one_lwp (struct lwp_info *l
       step = 1;
     }
 
-  if (debug_threads && the_low_target.get_pc != NULL)
+  if (the_low_target.get_pc != NULL)
     {
       struct regcache *regcache = get_thread_regcache (current_thread, 1);
-      CORE_ADDR pc = (*the_low_target.get_pc) (regcache);
-      debug_printf ("  resuming from pc 0x%lx\n", (long) pc);
+
+      lwp->stop_pc = (*the_low_target.get_pc) (regcache);
+
+      if (debug_threads)
+	{
+	  debug_printf ("  %s from pc 0x%lx\n", step ? "step" : "continue",
+			(long) lwp->stop_pc);
+	}
     }
 
   /* If we have pending signals, consume one unless we are trying to
@@ -3480,7 +3500,7 @@ linux_resume_one_lwp (struct lwp_info *l
   regcache_invalidate_thread (thread);
   errno = 0;
   lwp->stopped = 0;
-  lwp->stopped_by_watchpoint = 0;
+  lwp->stop_reason = LWP_STOPPED_BY_NO_REASON;
   lwp->stepping = step;
   ptrace (step ? PTRACE_SINGLESTEP : PTRACE_CONT, lwpid_of (thread),
 	  (PTRACE_TYPE_ARG3) 0,
@@ -3601,7 +3621,7 @@ resume_status_pending_p (struct inferior
   if (lwp->resume == NULL)
     return 0;
 
-  if (lwp->status_pending_p)
+  if (thread_still_has_status_pending_p (thread))
     * (int *) flag_p = 1;
 
   return 0;
@@ -4886,7 +4906,7 @@ linux_stopped_by_watchpoint (void)
 {
   struct lwp_info *lwp = get_thread_lwp (current_thread);
 
-  return lwp->stopped_by_watchpoint;
+  return lwp->stop_reason == LWP_STOPPED_BY_WATCHPOINT;
 }
 
 static CORE_ADDR
@@ -6055,7 +6075,6 @@ static struct target_ops linux_target_op
   NULL,
   linux_pause_all,
   linux_unpause_all,
-  linux_cancel_breakpoints,
   linux_stabilize_threads,
   linux_install_fast_tracepoint_jump_pad,
   linux_emit_ops,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/gdbserver/linux-low.h ./gdb/gdbserver/linux-low.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/gdbserver/linux-low.h	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/gdbserver/linux-low.h	2015-01-10 01:48:30.000000000 +0000
@@ -230,6 +230,24 @@ extern struct linux_target_ops the_low_t
 #define get_thread_lwp(thr) ((struct lwp_info *) (inferior_target_data (thr)))
 #define get_lwp_thread(lwp) ((lwp)->thread)
 
+/* Reasons an LWP last stopped.  */
+
+enum lwp_stop_reason
+{
+  /* Either not stopped, or stopped for a reason that doesn't require
+     special tracking.  */
+  LWP_STOPPED_BY_NO_REASON,
+
+  /* Stopped by a software breakpoint.  */
+  LWP_STOPPED_BY_SW_BREAKPOINT,
+
+  /* Stopped by a hardware breakpoint.  */
+  LWP_STOPPED_BY_HW_BREAKPOINT,
+
+  /* Stopped by a watchpoint.  */
+  LWP_STOPPED_BY_WATCHPOINT
+};
+
 /* This struct is recorded in the target_data field of struct thread_info.
 
    On linux ``all_threads'' is keyed by the LWP ID, which we use as the
@@ -269,8 +287,9 @@ struct lwp_info
   /* When stopped is set, the last wait status recorded for this lwp.  */
   int last_status;
 
-  /* When stopped is set, this is where the lwp stopped, with
-     decr_pc_after_break already accounted for.  */
+  /* When stopped is set, this is where the lwp last stopped, with
+     decr_pc_after_break already accounted for.  If the LWP is
+     running, this is the address at which the lwp was resumed.  */
   CORE_ADDR stop_pc;
 
   /* If this flag is set, STATUS_PENDING is a waitstatus that has not yet
@@ -278,9 +297,9 @@ struct lwp_info
   int status_pending_p;
   int status_pending;
 
-  /* STOPPED_BY_WATCHPOINT is non-zero if this LWP stopped with a data
-     watchpoint trap.  */
-  int stopped_by_watchpoint;
+  /* The reason the LWP last stopped, if we need to track it
+     (breakpoint, watchpoint, etc.)  */
+  enum lwp_stop_reason stop_reason;
 
   /* On architectures where it is possible to know the data address of
      a triggered watchpoint, STOPPED_DATA_ADDRESS is non-zero, and
@@ -351,12 +370,6 @@ int linux_pid_exe_is_elf_64_file (int pi
    errno).  */
 int linux_attach_lwp (ptid_t ptid);
 
-/* Return the reason an attach failed, in string form.  ERR is the
-   error returned by linux_attach_lwp (an errno).  This string should
-   be copied into a buffer by the client if the string will not be
-   immediately used, or if it must persist.  */
-char *linux_attach_fail_reason_string (ptid_t ptid, int err);
-
 struct lwp_info *find_lwp_pid (ptid_t ptid);
 void linux_stop_lwp (struct lwp_info *lwp);
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/gdbserver/linux-x86-low.c ./gdb/gdbserver/linux-x86-low.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/gdbserver/linux-x86-low.c	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/gdbserver/linux-x86-low.c	2015-01-10 01:48:30.000000000 +0000
@@ -805,7 +805,7 @@ x86_linux_prepare_to_resume (struct lwp_
       lwp->arch_private->debug_registers_changed = 0;
     }
 
-  if (clear_status || lwp->stopped_by_watchpoint)
+  if (clear_status || lwp->stop_reason == LWP_STOPPED_BY_WATCHPOINT)
     x86_linux_dr_set (ptid, DR_STATUS, 0);
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/gdbserver/mem-break.c ./gdb/gdbserver/mem-break.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/gdbserver/mem-break.c	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/gdbserver/mem-break.c	2015-01-10 01:48:30.000000000 +0000
@@ -1610,6 +1610,40 @@ breakpoint_inserted_here (CORE_ADDR addr
   return 0;
 }
 
+/* See mem-break.h.  */
+
+int
+software_breakpoint_inserted_here (CORE_ADDR addr)
+{
+  struct process_info *proc = current_process ();
+  struct raw_breakpoint *bp;
+
+  for (bp = proc->raw_breakpoints; bp != NULL; bp = bp->next)
+    if (bp->raw_type == raw_bkpt_type_sw
+	&& bp->pc == addr
+	&& bp->inserted)
+      return 1;
+
+  return 0;
+}
+
+/* See mem-break.h.  */
+
+int
+hardware_breakpoint_inserted_here (CORE_ADDR addr)
+{
+  struct process_info *proc = current_process ();
+  struct raw_breakpoint *bp;
+
+  for (bp = proc->raw_breakpoints; bp != NULL; bp = bp->next)
+    if (bp->raw_type == raw_bkpt_type_hw
+	&& bp->pc == addr
+	&& bp->inserted)
+      return 1;
+
+  return 0;
+}
+
 static int
 validate_inserted_breakpoint (struct raw_breakpoint *bp)
 {
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/gdbserver/mem-break.h ./gdb/gdbserver/mem-break.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/gdbserver/mem-break.h	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/gdbserver/mem-break.h	2015-01-10 01:48:30.000000000 +0000
@@ -90,6 +90,16 @@ int breakpoint_here (CORE_ADDR addr);
 
 int breakpoint_inserted_here (CORE_ADDR addr);
 
+/* Returns TRUE if there's any inserted software breakpoint at
+   ADDR.  */
+
+int software_breakpoint_inserted_here (CORE_ADDR addr);
+
+/* Returns TRUE if there's any inserted hardware (code) breakpoint at
+   ADDR.  */
+
+int hardware_breakpoint_inserted_here (CORE_ADDR addr);
+
 /* Clear all breakpoint conditions and commands associated with a
    breakpoint.  */
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/gdbserver/target.h ./gdb/gdbserver/target.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/gdbserver/target.h	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/gdbserver/target.h	2015-01-10 01:48:30.000000000 +0000
@@ -304,9 +304,6 @@ struct target_ops
      the pause call.  */
   void (*unpause_all) (int unfreeze);
 
-  /* Cancel all pending breakpoints hits in all threads.  */
-  void (*cancel_breakpoints) (void);
-
   /* Stabilize all threads.  That is, force them out of jump pads.  */
   void (*stabilize_threads) (void);
 
@@ -453,13 +450,6 @@ int kill_inferior (int);
 	(*the_target->unpause_all) (unfreeze);	\
     } while (0)
 
-#define cancel_breakpoints()			\
-  do						\
-    {						\
-      if (the_target->cancel_breakpoints)     	\
-	(*the_target->cancel_breakpoints) ();  	\
-    } while (0)
-
 #define stabilize_threads()			\
   do						\
     {						\
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/gdbserver/thread-db.c ./gdb/gdbserver/thread-db.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/gdbserver/thread-db.c	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/gdbserver/thread-db.c	2015-01-10 01:48:30.000000000 +0000
@@ -339,7 +339,7 @@ attach_thread (const td_thrhandle_t *th_
     {
       warning ("Could not attach to thread %ld (LWP %d): %s\n",
 	       ti_p->ti_tid, ti_p->ti_lid,
-	       linux_attach_fail_reason_string (ptid, err));
+	       linux_ptrace_attach_fail_reason_string (ptid, err));
       return 0;
     }
 
@@ -396,6 +396,17 @@ find_new_threads_callback (const td_thrh
   if (err != TD_OK)
     error ("Cannot get thread info: %s", thread_db_err_str (err));
 
+  if (ti.ti_lid == -1)
+    {
+      /* A thread with kernel thread ID -1 is either a thread that
+	 exited and was joined, or a thread that is being created but
+	 hasn't started yet, and that is reusing the tcb/stack of a
+	 thread that previously exited and was joined.  (glibc marks
+	 terminated and joined threads with kernel thread ID -1.  See
+	 glibc PR17707.  */
+      return 0;
+    }
+
   /* Check for zombies.  */
   if (ti.ti_state == TD_THR_UNKNOWN || ti.ti_state == TD_THR_ZOMBIE)
     return 0;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/gdbserver/tracepoint.c ./gdb/gdbserver/tracepoint.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/gdbserver/tracepoint.c	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/gdbserver/tracepoint.c	2015-01-10 01:48:30.000000000 +0000
@@ -2443,7 +2443,6 @@ clear_installed_tracepoints (void)
   struct tracepoint *prev_stpoint;
 
   pause_all (1);
-  cancel_breakpoints ();
 
   prev_stpoint = NULL;
 
@@ -3433,9 +3432,6 @@ stop_tracing (void)
      We can't now, since we may be getting here due to the inferior
      agent calling us.  */
   pause_all (1);
-  /* Since we're removing breakpoints, cancel breakpoint hits,
-     possibly related to the breakpoints we're about to delete.  */
-  cancel_breakpoints ();
 
   /* Stop logging. Tracepoints can still be hit, but they will not be
      recorded.  */
@@ -6538,7 +6534,6 @@ upload_fast_traceframes (void)
   trace_debug ("Done uploading traceframes [%d]\n", curr_tbctrl_idx);
 
   pause_all (1);
-  cancel_breakpoints ();
 
   delete_breakpoint (about_to_request_buffer_space_bkpt);
   about_to_request_buffer_space_bkpt = NULL;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/linux-nat.c ./gdb/linux-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/linux-nat.c	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/linux-nat.c	2015-01-10 01:48:30.000000000 +0000
@@ -277,6 +277,12 @@ static void purge_lwp_list (int pid);
 static void delete_lwp (ptid_t ptid);
 static struct lwp_info *find_lwp_pid (ptid_t ptid);
 
+static int lwp_status_pending_p (struct lwp_info *lp);
+
+static int check_stopped_by_breakpoint (struct lwp_info *lp);
+static int sigtrap_is_event (int status);
+static int (*linux_nat_status_is_event) (int status) = sigtrap_is_event;
+
 
 /* Trivial list manipulation functions to keep track of a list of
    new stopped processes.  */
@@ -1023,6 +1029,7 @@ lin_lwp_attach_lwp (ptid_t ptid)
 
 		  /* See if we've got a stop for this new child
 		     pending.  If so, we're already attached.  */
+		  gdb_assert (lwpid > 0);
 		  new_pid = my_waitpid (lwpid, &status, WNOHANG);
 		  if (new_pid == -1 && errno == ECHILD)
 		    new_pid = my_waitpid (lwpid, &status, __WCLONE | WNOHANG);
@@ -1137,6 +1144,73 @@ linux_nat_create_inferior (struct target
 #endif /* HAVE_PERSONALITY */
 }
 
+/* Callback for linux_proc_attach_tgid_threads.  Attach to PTID if not
+   already attached.  Returns true if a new LWP is found, false
+   otherwise.  */
+
+static int
+attach_proc_task_lwp_callback (ptid_t ptid)
+{
+  struct lwp_info *lp;
+
+  /* Ignore LWPs we're already attached to.  */
+  lp = find_lwp_pid (ptid);
+  if (lp == NULL)
+    {
+      int lwpid = ptid_get_lwp (ptid);
+
+      if (ptrace (PTRACE_ATTACH, lwpid, 0, 0) < 0)
+	{
+	  int err = errno;
+
+	  /* Be quiet if we simply raced with the thread exiting.
+	     EPERM is returned if the thread's task still exists, and
+	     is marked as exited or zombie, as well as other
+	     conditions, so in that case, confirm the status in
+	     /proc/PID/status.  */
+	  if (err == ESRCH
+	      || (err == EPERM && linux_proc_pid_is_gone (lwpid)))
+	    {
+	      if (debug_linux_nat)
+		{
+		  fprintf_unfiltered (gdb_stdlog,
+				      "Cannot attach to lwp %d: "
+				      "thread is gone (%d: %s)\n",
+				      lwpid, err, safe_strerror (err));
+		}
+	    }
+	  else
+	    {
+	      warning (_("Cannot attach to lwp %d: %s\n"),
+		       lwpid,
+		       linux_ptrace_attach_fail_reason_string (ptid,
+							       err));
+	    }
+	}
+      else
+	{
+	  if (debug_linux_nat)
+	    fprintf_unfiltered (gdb_stdlog,
+				"PTRACE_ATTACH %s, 0, 0 (OK)\n",
+				target_pid_to_str (ptid));
+
+	  lp = add_lwp (ptid);
+	  lp->cloned = 1;
+
+	  /* The next time we wait for this LWP we'll see a SIGSTOP as
+	     PTRACE_ATTACH brings it to a halt.  */
+	  lp->signalled = 1;
+
+	  /* We need to wait for a stop before being able to make the
+	     next ptrace call on this LWP.  */
+	  lp->must_set_ptrace_flags = 1;
+	}
+
+      return 1;
+    }
+  return 0;
+}
+
 static void
 linux_nat_attach (struct target_ops *ops, const char *args, int from_tty)
 {
@@ -1230,6 +1304,16 @@ linux_nat_attach (struct target_ops *ops
 
   lp->status = status;
 
+  /* We must attach to every LWP.  If /proc is mounted, use that to
+     find them now.  The inferior may be using raw clone instead of
+     using pthreads.  But even if it is using pthreads, thread_db
+     walks structures in the inferior's address space to find the list
+     of threads/LWPs, and those structures may well be corrupted.
+     Note that once thread_db is loaded, we'll still use it to list
+     threads and associate pthread info with each LWP.  */
+  linux_proc_attach_tgid_threads (ptid_get_pid (lp->ptid),
+				  attach_proc_task_lwp_callback);
+
   if (target_can_async_p ())
     target_async (inferior_event_handler, 0);
 }
@@ -1430,6 +1514,38 @@ linux_nat_detach (struct target_ops *ops
     linux_ops->to_detach (ops, args, from_tty);
 }
 
+/* Resume execution of the inferior process.  If STEP is nonzero,
+   single-step it.  If SIGNAL is nonzero, give it that signal.  */
+
+static void
+linux_resume_one_lwp (struct lwp_info *lp, int step, enum gdb_signal signo)
+{
+  ptid_t ptid;
+
+  lp->step = step;
+
+  /* stop_pc doubles as the PC the LWP had when it was last resumed.
+     We only presently need that if the LWP is stepped though (to
+     handle the case of stepping a breakpoint instruction).  */
+  if (step)
+    {
+      struct regcache *regcache = get_thread_regcache (lp->ptid);
+
+      lp->stop_pc = regcache_read_pc (regcache);
+    }
+  else
+    lp->stop_pc = 0;
+
+  if (linux_nat_prepare_to_resume != NULL)
+    linux_nat_prepare_to_resume (lp);
+  /* Convert to something the lower layer understands.  */
+  ptid = pid_to_ptid (ptid_get_lwp (lp->ptid));
+  linux_ops->to_resume (linux_ops, ptid, step, signo);
+  lp->stop_reason = LWP_STOPPED_BY_NO_REASON;
+  lp->stopped = 0;
+  registers_changed_ptid (lp->ptid);
+}
+
 /* Resume LP.  */
 
 static void
@@ -1446,8 +1562,7 @@ resume_lwp (struct lwp_info *lp, int ste
 				"RC: Not resuming %s (vfork parent)\n",
 				target_pid_to_str (lp->ptid));
 	}
-      else if (lp->status == 0
-	       && lp->waitstatus.kind == TARGET_WAITKIND_IGNORE)
+      else if (!lwp_status_pending_p (lp))
 	{
 	  if (debug_linux_nat)
 	    fprintf_unfiltered (gdb_stdlog,
@@ -1458,14 +1573,7 @@ resume_lwp (struct lwp_info *lp, int ste
 				 : "0"),
 				step ? "step" : "resume");
 
-	  if (linux_nat_prepare_to_resume != NULL)
-	    linux_nat_prepare_to_resume (lp);
-	  linux_ops->to_resume (linux_ops,
-				pid_to_ptid (ptid_get_lwp (lp->ptid)),
-				step, signo);
-	  lp->stopped = 0;
-	  lp->step = step;
-	  lp->stopped_by_watchpoint = 0;
+	  linux_resume_one_lwp (lp, step, signo);
 	}
       else
 	{
@@ -1559,7 +1667,6 @@ linux_nat_resume (struct target_ops *ops
   gdb_assert (lp != NULL);
 
   /* Remember if we're stepping.  */
-  lp->step = step;
   lp->last_resume_kind = step ? resume_step : resume_continue;
 
   /* If we have a pending wait status for this thread, there is no
@@ -1589,7 +1696,7 @@ linux_nat_resume (struct target_ops *ops
 	}
     }
 
-  if (lp->status || lp->waitstatus.kind != TARGET_WAITKIND_IGNORE)
+  if (lwp_status_pending_p (lp))
     {
       /* FIXME: What should we do if we are supposed to continue
 	 this thread with a signal?  */
@@ -1612,14 +1719,7 @@ linux_nat_resume (struct target_ops *ops
   if (resume_many)
     iterate_over_lwps (ptid, linux_nat_resume_callback, lp);
 
-  /* Convert to something the lower layer understands.  */
-  ptid = pid_to_ptid (ptid_get_lwp (lp->ptid));
-
-  if (linux_nat_prepare_to_resume != NULL)
-    linux_nat_prepare_to_resume (lp);
-  linux_ops->to_resume (linux_ops, ptid, step, signo);
-  lp->stopped_by_watchpoint = 0;
-  lp->stopped = 0;
+  linux_resume_one_lwp (lp, step, signo);
 
   if (debug_linux_nat)
     fprintf_unfiltered (gdb_stdlog,
@@ -1783,14 +1883,7 @@ linux_handle_syscall_trap (struct lwp_in
      subsequent syscall.  Simply resume using the inf-ptrace layer,
      which knows when to use PT_SYSCALL or PT_CONTINUE.  */
 
-  /* Note that gdbarch_get_syscall_number may access registers, hence
-     fill a regcache.  */
-  registers_changed ();
-  if (linux_nat_prepare_to_resume != NULL)
-    linux_nat_prepare_to_resume (lp);
-  linux_ops->to_resume (linux_ops, pid_to_ptid (ptid_get_lwp (lp->ptid)),
-			lp->step, GDB_SIGNAL_0);
-  lp->stopped = 0;
+  linux_resume_one_lwp (lp, lp->step, GDB_SIGNAL_0);
   return 1;
 }
 
@@ -1984,23 +2077,14 @@ linux_handle_extended_wait (struct lwp_i
 		    fprintf_unfiltered (gdb_stdlog,
 					"LHEW: resuming new LWP %ld\n",
 					ptid_get_lwp (new_lp->ptid));
-		  if (linux_nat_prepare_to_resume != NULL)
-		    linux_nat_prepare_to_resume (new_lp);
-		  linux_ops->to_resume (linux_ops, pid_to_ptid (new_pid),
-					0, GDB_SIGNAL_0);
-		  new_lp->stopped = 0;
+		  linux_resume_one_lwp (new_lp, 0, GDB_SIGNAL_0);
 		}
 	    }
 
 	  if (debug_linux_nat)
 	    fprintf_unfiltered (gdb_stdlog,
 				"LHEW: resuming parent LWP %d\n", pid);
-	  if (linux_nat_prepare_to_resume != NULL)
-	    linux_nat_prepare_to_resume (lp);
-	  linux_ops->to_resume (linux_ops,
-				pid_to_ptid (ptid_get_lwp (lp->ptid)),
-				0, GDB_SIGNAL_0);
-	  lp->stopped = 0;
+	  linux_resume_one_lwp (lp, 0, GDB_SIGNAL_0);
 	  return 1;
 	}
 
@@ -2018,6 +2102,10 @@ linux_handle_extended_wait (struct lwp_i
       ourstatus->value.execd_pathname
 	= xstrdup (linux_child_pid_to_exec_file (NULL, pid));
 
+      /* The thread that execed must have been resumed, but, when a
+	 thread execs, it changes its tid to the tgid, and the old
+	 tgid thread might have not been resumed.  */
+      lp->resumed = 1;
       return 0;
     }
 
@@ -2159,6 +2247,14 @@ wait_lwp (struct lwp_info *lp)
   gdb_assert (WIFSTOPPED (status));
   lp->stopped = 1;
 
+  if (lp->must_set_ptrace_flags)
+    {
+      struct inferior *inf = find_inferior_pid (ptid_get_pid (lp->ptid));
+
+      linux_enable_event_reporting (ptid_get_lwp (lp->ptid), inf->attach_flag);
+      lp->must_set_ptrace_flags = 0;
+    }
+
   /* Handle GNU/Linux's syscall SIGTRAPs.  */
   if (WIFSTOPPED (status) && WSTOPSIG (status) == SYSCALL_SIGTRAP)
     {
@@ -2295,24 +2391,21 @@ maybe_clear_ignore_sigint (struct lwp_in
    soon as we see LP stop with a SIGTRAP.  If GDB changes the debug
    registers meanwhile, we have the cached data we can rely on.  */
 
-static void
-save_sigtrap (struct lwp_info *lp)
+static int
+check_stopped_by_watchpoint (struct lwp_info *lp)
 {
   struct cleanup *old_chain;
 
   if (linux_ops->to_stopped_by_watchpoint == NULL)
-    {
-      lp->stopped_by_watchpoint = 0;
-      return;
-    }
+    return 0;
 
   old_chain = save_inferior_ptid ();
   inferior_ptid = lp->ptid;
 
-  lp->stopped_by_watchpoint = linux_ops->to_stopped_by_watchpoint (linux_ops);
-
-  if (lp->stopped_by_watchpoint)
+  if (linux_ops->to_stopped_by_watchpoint (linux_ops))
     {
+      lp->stop_reason = LWP_STOPPED_BY_WATCHPOINT;
+
       if (linux_ops->to_stopped_data_address != NULL)
 	lp->stopped_data_address_p =
 	  linux_ops->to_stopped_data_address (&current_target,
@@ -2322,9 +2415,27 @@ save_sigtrap (struct lwp_info *lp)
     }
 
   do_cleanups (old_chain);
+
+  return lp->stop_reason == LWP_STOPPED_BY_WATCHPOINT;
+}
+
+/* Called when the LWP stopped for a trap that could be explained by a
+   watchpoint or a breakpoint.  */
+
+static void
+save_sigtrap (struct lwp_info *lp)
+{
+  gdb_assert (lp->stop_reason == LWP_STOPPED_BY_NO_REASON);
+  gdb_assert (lp->status != 0);
+
+  if (check_stopped_by_watchpoint (lp))
+    return;
+
+  if (linux_nat_status_is_event (lp->status))
+    check_stopped_by_breakpoint (lp);
 }
 
-/* See save_sigtrap.  */
+/* Returns true if the LWP had stopped for a watchpoint.  */
 
 static int
 linux_nat_stopped_by_watchpoint (struct target_ops *ops)
@@ -2333,7 +2444,7 @@ linux_nat_stopped_by_watchpoint (struct 
 
   gdb_assert (lp != NULL);
 
-  return lp->stopped_by_watchpoint;
+  return lp->stop_reason == LWP_STOPPED_BY_WATCHPOINT;
 }
 
 static int
@@ -2356,24 +2467,6 @@ sigtrap_is_event (int status)
   return WIFSTOPPED (status) && WSTOPSIG (status) == SIGTRAP;
 }
 
-/* SIGTRAP-like events recognizer.  */
-
-static int (*linux_nat_status_is_event) (int status) = sigtrap_is_event;
-
-/* Check for SIGTRAP-like events in LP.  */
-
-static int
-linux_nat_lp_status_is_event (struct lwp_info *lp)
-{
-  /* We check for lp->waitstatus in addition to lp->status, because we can
-     have pending process exits recorded in lp->status
-     and W_EXITCODE(0,0) == 0.  We should probably have an additional
-     lp->status_p flag.  */
-
-  return (lp->waitstatus.kind == TARGET_WAITKIND_IGNORE
-	  && linux_nat_status_is_event (lp->status));
-}
-
 /* Set alternative SIGTRAP-like events recognizer.  If
    breakpoint_inserted_here_p there then gdbarch_decr_pc_after_break will be
    applied.  */
@@ -2429,8 +2522,6 @@ stop_wait_callback (struct lwp_info *lp,
 	{
 	  /* The thread was stopped with a signal other than SIGSTOP.  */
 
-	  save_sigtrap (lp);
-
 	  if (debug_linux_nat)
 	    fprintf_unfiltered (gdb_stdlog,
 				"SWC: Pending event %s in %s\n",
@@ -2440,6 +2531,7 @@ stop_wait_callback (struct lwp_info *lp,
 	  /* Save the sigtrap event.  */
 	  lp->status = status;
 	  gdb_assert (lp->signalled);
+	  save_sigtrap (lp);
 	}
       else
 	{
@@ -2460,7 +2552,9 @@ stop_wait_callback (struct lwp_info *lp,
   return 0;
 }
 
-/* Return non-zero if LP has a wait status pending.  */
+/* Return non-zero if LP has a wait status pending.  Discard the
+   pending event and resume the LWP if the event that originally
+   caused the stop became uninteresting.  */
 
 static int
 status_callback (struct lwp_info *lp, void *data)
@@ -2470,20 +2564,54 @@ status_callback (struct lwp_info *lp, vo
   if (!lp->resumed)
     return 0;
 
-  if (lp->waitstatus.kind != TARGET_WAITKIND_IGNORE)
+  if (lp->stop_reason == LWP_STOPPED_BY_SW_BREAKPOINT
+      || lp->stop_reason == LWP_STOPPED_BY_HW_BREAKPOINT)
     {
-      /* A ptrace event, like PTRACE_FORK|VFORK|EXEC, syscall event,
-	 or a pending process exit.  Note that `W_EXITCODE(0,0) ==
-	 0', so a clean process exit can not be stored pending in
-	 lp->status, it is indistinguishable from
-	 no-pending-status.  */
+      struct regcache *regcache = get_thread_regcache (lp->ptid);
+      struct gdbarch *gdbarch = get_regcache_arch (regcache);
+      CORE_ADDR pc;
+      int discard = 0;
+
+      gdb_assert (lp->status != 0);
+
+      pc = regcache_read_pc (regcache);
+
+      if (pc != lp->stop_pc)
+	{
+	  if (debug_linux_nat)
+	    fprintf_unfiltered (gdb_stdlog,
+				"SC: PC of %s changed.  was=%s, now=%s\n",
+				target_pid_to_str (lp->ptid),
+				paddress (target_gdbarch (), lp->stop_pc),
+				paddress (target_gdbarch (), pc));
+	  discard = 1;
+	}
+      else if (!breakpoint_inserted_here_p (get_regcache_aspace (regcache), pc))
+	{
+	  if (debug_linux_nat)
+	    fprintf_unfiltered (gdb_stdlog,
+				"SC: previous breakpoint of %s, at %s gone\n",
+				target_pid_to_str (lp->ptid),
+				paddress (target_gdbarch (), lp->stop_pc));
+
+	  discard = 1;
+	}
+
+      if (discard)
+	{
+	  if (debug_linux_nat)
+	    fprintf_unfiltered (gdb_stdlog,
+				"SC: pending event of %s cancelled.\n",
+				target_pid_to_str (lp->ptid));
+
+	  lp->status = 0;
+	  linux_resume_one_lwp (lp, lp->step, GDB_SIGNAL_0);
+	  return 0;
+	}
       return 1;
     }
 
-  if (lp->status != 0)
-    return 1;
-
-  return 0;
+  return lwp_status_pending_p (lp);
 }
 
 /* Return non-zero if LP isn't stopped.  */
@@ -2492,9 +2620,7 @@ static int
 running_callback (struct lwp_info *lp, void *data)
 {
   return (!lp->stopped
-	  || ((lp->status != 0
-	       || lp->waitstatus.kind != TARGET_WAITKIND_IGNORE)
-	      && lp->resumed));
+	  || (lwp_status_pending_p (lp) && lp->resumed));
 }
 
 /* Count the LWP's that have had events.  */
@@ -2506,8 +2632,8 @@ count_events_callback (struct lwp_info *
 
   gdb_assert (count != NULL);
 
-  /* Count only resumed LWPs that have a SIGTRAP event pending.  */
-  if (lp->resumed && linux_nat_lp_status_is_event (lp))
+  /* Select only resumed LWPs that have an event pending.  */
+  if (lp->resumed && lwp_status_pending_p (lp))
     (*count)++;
 
   return 0;
@@ -2525,6 +2651,17 @@ select_singlestep_lwp_callback (struct l
     return 0;
 }
 
+/* Returns true if LP has a status pending.  */
+
+static int
+lwp_status_pending_p (struct lwp_info *lp)
+{
+  /* We check for lp->waitstatus in addition to lp->status, because we
+     can have pending process exits recorded in lp->status and
+     W_EXITCODE(0,0) happens to be 0.  */
+  return lp->status != 0 || lp->waitstatus.kind != TARGET_WAITKIND_IGNORE;
+}
+
 /* Select the Nth LWP that has had a SIGTRAP event.  */
 
 static int
@@ -2534,16 +2671,19 @@ select_event_lwp_callback (struct lwp_in
 
   gdb_assert (selector != NULL);
 
-  /* Select only resumed LWPs that have a SIGTRAP event pending.  */
-  if (lp->resumed && linux_nat_lp_status_is_event (lp))
+  /* Select only resumed LWPs that have an event pending.  */
+  if (lp->resumed && lwp_status_pending_p (lp))
     if ((*selector)-- == 0)
       return 1;
 
   return 0;
 }
 
+/* Called when the LWP got a signal/trap that could be explained by a
+   software or hardware breakpoint.  */
+
 static int
-cancel_breakpoint (struct lwp_info *lp)
+check_stopped_by_breakpoint (struct lwp_info *lp)
 {
   /* Arrange for a breakpoint to be hit again later.  We don't keep
      the SIGTRAP status and don't forward the SIGTRAP signal to the
@@ -2557,48 +2697,42 @@ cancel_breakpoint (struct lwp_info *lp)
   struct regcache *regcache = get_thread_regcache (lp->ptid);
   struct gdbarch *gdbarch = get_regcache_arch (regcache);
   CORE_ADDR pc;
+  CORE_ADDR sw_bp_pc;
+
+  pc = regcache_read_pc (regcache);
+  sw_bp_pc = pc - target_decr_pc_after_break (gdbarch);
 
-  pc = regcache_read_pc (regcache) - target_decr_pc_after_break (gdbarch);
-  if (breakpoint_inserted_here_p (get_regcache_aspace (regcache), pc))
+  if ((!lp->step || lp->stop_pc == sw_bp_pc)
+      && software_breakpoint_inserted_here_p (get_regcache_aspace (regcache),
+					      sw_bp_pc))
     {
+      /* The LWP was either continued, or stepped a software
+	 breakpoint instruction.  */
       if (debug_linux_nat)
 	fprintf_unfiltered (gdb_stdlog,
-			    "CB: Push back breakpoint for %s\n",
+			    "CB: Push back software breakpoint for %s\n",
 			    target_pid_to_str (lp->ptid));
 
       /* Back up the PC if necessary.  */
-      if (target_decr_pc_after_break (gdbarch))
-	regcache_write_pc (regcache, pc);
+      if (pc != sw_bp_pc)
+	regcache_write_pc (regcache, sw_bp_pc);
 
+      lp->stop_pc = sw_bp_pc;
+      lp->stop_reason = LWP_STOPPED_BY_SW_BREAKPOINT;
       return 1;
     }
-  return 0;
-}
-
-static int
-cancel_breakpoints_callback (struct lwp_info *lp, void *data)
-{
-  struct lwp_info *event_lp = data;
 
-  /* Leave the LWP that has been elected to receive a SIGTRAP alone.  */
-  if (lp == event_lp)
-    return 0;
-
-  /* If a LWP other than the LWP that we're reporting an event for has
-     hit a GDB breakpoint (as opposed to some random trap signal),
-     then just arrange for it to hit it again later.  We don't keep
-     the SIGTRAP status and don't forward the SIGTRAP signal to the
-     LWP.  We will handle the current event, eventually we will resume
-     all LWPs, and this one will get its breakpoint trap again.
-
-     If we do not do this, then we run the risk that the user will
-     delete or disable the breakpoint, but the LWP will have already
-     tripped on it.  */
+  if (hardware_breakpoint_inserted_here_p (get_regcache_aspace (regcache), pc))
+    {
+      if (debug_linux_nat)
+	fprintf_unfiltered (gdb_stdlog,
+			    "CB: Push back hardware breakpoint for %s\n",
+			    target_pid_to_str (lp->ptid));
 
-  if (linux_nat_lp_status_is_event (lp)
-      && cancel_breakpoint (lp))
-    /* Throw away the SIGTRAP.  */
-    lp->status = 0;
+      lp->stop_pc = pc;
+      lp->stop_reason = LWP_STOPPED_BY_HW_BREAKPOINT;
+      return 1;
+    }
 
   return 0;
 }
@@ -2610,36 +2744,48 @@ select_event_lwp (ptid_t filter, struct 
 {
   int num_events = 0;
   int random_selector;
-  struct lwp_info *event_lp;
+  struct lwp_info *event_lp = NULL;
 
   /* Record the wait status for the original LWP.  */
   (*orig_lp)->status = *status;
 
-  /* Give preference to any LWP that is being single-stepped.  */
-  event_lp = iterate_over_lwps (filter,
-				select_singlestep_lwp_callback, NULL);
-  if (event_lp != NULL)
+  /* In all-stop, give preference to the LWP that is being
+     single-stepped.  There will be at most one, and it will be the
+     LWP that the core is most interested in.  If we didn't do this,
+     then we'd have to handle pending step SIGTRAPs somehow in case
+     the core later continues the previously-stepped thread, as
+     otherwise we'd report the pending SIGTRAP then, and the core, not
+     having stepped the thread, wouldn't understand what the trap was
+     for, and therefore would report it to the user as a random
+     signal.  */
+  if (!non_stop)
     {
-      if (debug_linux_nat)
-	fprintf_unfiltered (gdb_stdlog,
-			    "SEL: Select single-step %s\n",
-			    target_pid_to_str (event_lp->ptid));
+      event_lp = iterate_over_lwps (filter,
+				    select_singlestep_lwp_callback, NULL);
+      if (event_lp != NULL)
+	{
+	  if (debug_linux_nat)
+	    fprintf_unfiltered (gdb_stdlog,
+				"SEL: Select single-step %s\n",
+				target_pid_to_str (event_lp->ptid));
+	}
     }
-  else
+
+  if (event_lp == NULL)
     {
-      /* No single-stepping LWP.  Select one at random, out of those
-         which have had SIGTRAP events.  */
+      /* Pick one at random, out of those which have had events.  */
 
-      /* First see how many SIGTRAP events we have.  */
+      /* First see how many events we have.  */
       iterate_over_lwps (filter, count_events_callback, &num_events);
 
-      /* Now randomly pick a LWP out of those that have had a SIGTRAP.  */
+      /* Now randomly pick a LWP out of those that have had
+	 events.  */
       random_selector = (int)
 	((num_events * (double) rand ()) / (RAND_MAX + 1.0));
 
       if (debug_linux_nat && num_events > 1)
 	fprintf_unfiltered (gdb_stdlog,
-			    "SEL: Found %d SIGTRAP events, selecting #%d\n",
+			    "SEL: Found %d events, selecting #%d\n",
 			    num_events, random_selector);
 
       event_lp = iterate_over_lwps (filter,
@@ -2673,8 +2819,6 @@ resumed_callback (struct lwp_info *lp, v
 static int
 stop_and_resume_callback (struct lwp_info *lp, void *data)
 {
-  int *new_pending_p = data;
-
   if (!lp->stopped)
     {
       ptid_t ptid = lp->ptid;
@@ -2688,7 +2832,7 @@ stop_and_resume_callback (struct lwp_inf
       if (lp != NULL)
 	{
 	  if (lp->last_resume_kind == resume_stop
-	      && lp->status == 0)
+	      && !lwp_status_pending_p (lp))
 	    {
 	      /* The core wanted the LWP to stop.  Even if it stopped
 		 cleanly (with SIGSTOP), leave the event pending.  */
@@ -2700,7 +2844,7 @@ stop_and_resume_callback (struct lwp_inf
 	      lp->status = W_STOPCODE (SIGSTOP);
 	    }
 
-	  if (lp->status == 0)
+	  if (!lwp_status_pending_p (lp))
 	    {
 	      if (debug_linux_nat)
 		fprintf_unfiltered (gdb_stdlog,
@@ -2715,8 +2859,6 @@ stop_and_resume_callback (struct lwp_inf
 				    "SARC: not re-resuming LWP %ld "
 				    "(has pending)\n",
 				    ptid_get_lwp (lp->ptid));
-	      if (new_pending_p)
-		*new_pending_p = 1;
 	    }
 	}
     }
@@ -2724,18 +2866,14 @@ stop_and_resume_callback (struct lwp_inf
 }
 
 /* Check if we should go on and pass this event to common code.
-   Return the affected lwp if we are, or NULL otherwise.  If we stop
-   all lwps temporarily, we may end up with new pending events in some
-   other lwp.  In that case set *NEW_PENDING_P to true.  */
+   Return the affected lwp if we are, or NULL otherwise.  */
 
 static struct lwp_info *
-linux_nat_filter_event (int lwpid, int status, int *new_pending_p)
+linux_nat_filter_event (int lwpid, int status)
 {
   struct lwp_info *lp;
   int event = linux_ptrace_get_extended_event (status);
 
-  *new_pending_p = 0;
-
   lp = find_lwp_pid (pid_to_ptid (lwpid));
 
   /* Check for stop events reported by a process we didn't already
@@ -2783,6 +2921,14 @@ linux_nat_filter_event (int lwpid, int s
      ever being continued.)  */
   lp->stopped = 1;
 
+  if (WIFSTOPPED (status) && lp->must_set_ptrace_flags)
+    {
+      struct inferior *inf = find_inferior_pid (ptid_get_pid (lp->ptid));
+
+      linux_enable_event_reporting (ptid_get_lwp (lp->ptid), inf->attach_flag);
+      lp->must_set_ptrace_flags = 0;
+    }
+
   /* Handle GNU/Linux's syscall SIGTRAPs.  */
   if (WIFSTOPPED (status) && WSTOPSIG (status) == SYSCALL_SIGTRAP)
     {
@@ -2807,42 +2953,62 @@ linux_nat_filter_event (int lwpid, int s
 	return NULL;
     }
 
-  if (linux_nat_status_is_event (status))
-    save_sigtrap (lp);
-
   /* Check if the thread has exited.  */
-  if ((WIFEXITED (status) || WIFSIGNALED (status))
-      && num_lwps (ptid_get_pid (lp->ptid)) > 1)
+  if (WIFEXITED (status) || WIFSIGNALED (status))
     {
-      /* If this is the main thread, we must stop all threads and verify
-	 if they are still alive.  This is because in the nptl thread model
-	 on Linux 2.4, there is no signal issued for exiting LWPs
-	 other than the main thread.  We only get the main thread exit
-	 signal once all child threads have already exited.  If we
-	 stop all the threads and use the stop_wait_callback to check
-	 if they have exited we can determine whether this signal
-	 should be ignored or whether it means the end of the debugged
-	 application, regardless of which threading model is being
-	 used.  */
-      if (ptid_get_pid (lp->ptid) == ptid_get_lwp (lp->ptid))
+      if (num_lwps (ptid_get_pid (lp->ptid)) > 1)
 	{
-	  iterate_over_lwps (pid_to_ptid (ptid_get_pid (lp->ptid)),
-			     stop_and_resume_callback, new_pending_p);
+	  /* If this is the main thread, we must stop all threads and
+	     verify if they are still alive.  This is because in the
+	     nptl thread model on Linux 2.4, there is no signal issued
+	     for exiting LWPs other than the main thread.  We only get
+	     the main thread exit signal once all child threads have
+	     already exited.  If we stop all the threads and use the
+	     stop_wait_callback to check if they have exited we can
+	     determine whether this signal should be ignored or
+	     whether it means the end of the debugged application,
+	     regardless of which threading model is being used.  */
+	  if (ptid_get_pid (lp->ptid) == ptid_get_lwp (lp->ptid))
+	    {
+	      iterate_over_lwps (pid_to_ptid (ptid_get_pid (lp->ptid)),
+				 stop_and_resume_callback, NULL);
+	    }
+
+	  if (debug_linux_nat)
+	    fprintf_unfiltered (gdb_stdlog,
+				"LLW: %s exited.\n",
+				target_pid_to_str (lp->ptid));
+
+	  if (num_lwps (ptid_get_pid (lp->ptid)) > 1)
+	    {
+	      /* If there is at least one more LWP, then the exit signal
+		 was not the end of the debugged application and should be
+		 ignored.  */
+	      exit_lwp (lp);
+	      return NULL;
+	    }
 	}
 
+      gdb_assert (lp->resumed);
+
       if (debug_linux_nat)
 	fprintf_unfiltered (gdb_stdlog,
-			    "LLW: %s exited.\n",
-			    target_pid_to_str (lp->ptid));
+			    "Process %ld exited\n",
+			    ptid_get_lwp (lp->ptid));
 
-      if (num_lwps (ptid_get_pid (lp->ptid)) > 1)
-       {
-	 /* If there is at least one more LWP, then the exit signal
-	    was not the end of the debugged application and should be
-	    ignored.  */
-	 exit_lwp (lp);
-	 return NULL;
-       }
+      /* This was the last lwp in the process.  Since events are
+	 serialized to GDB core, we may not be able report this one
+	 right now, but GDB core and the other target layers will want
+	 to be notified about the exit code/signal, leave the status
+	 pending for the next time we're able to report it.  */
+
+      /* Dead LWP's aren't expected to reported a pending sigstop.  */
+      lp->signalled = 0;
+
+      /* Store the pending event in the waitstatus, because
+	 W_EXITCODE(0,0) == 0.  */
+      store_waitstatus (&lp->waitstatus, status);
+      return lp;
     }
 
   /* Check if the current LWP has previously exited.  In the nptl
@@ -2883,13 +3049,7 @@ linux_nat_filter_event (int lwpid, int s
 	{
 	  /* This is a delayed SIGSTOP.  */
 
-	  registers_changed ();
-
-	  if (linux_nat_prepare_to_resume != NULL)
-	    linux_nat_prepare_to_resume (lp);
-	  linux_ops->to_resume (linux_ops,
-				pid_to_ptid (ptid_get_lwp (lp->ptid)),
-				lp->step, GDB_SIGNAL_0);
+	  linux_resume_one_lwp (lp, lp->step, GDB_SIGNAL_0);
 	  if (debug_linux_nat)
 	    fprintf_unfiltered (gdb_stdlog,
 				"LLW: %s %s, 0, 0 (discard SIGSTOP)\n",
@@ -2897,7 +3057,6 @@ linux_nat_filter_event (int lwpid, int s
 				"PTRACE_SINGLESTEP" : "PTRACE_CONT",
 				target_pid_to_str (lp->ptid));
 
-	  lp->stopped = 0;
 	  gdb_assert (lp->resumed);
 
 	  /* Discard the event.  */
@@ -2918,28 +3077,72 @@ linux_nat_filter_event (int lwpid, int s
       /* This is a delayed SIGINT.  */
       lp->ignore_sigint = 0;
 
-      registers_changed ();
-      if (linux_nat_prepare_to_resume != NULL)
-	linux_nat_prepare_to_resume (lp);
-      linux_ops->to_resume (linux_ops, pid_to_ptid (ptid_get_lwp (lp->ptid)),
-			    lp->step, GDB_SIGNAL_0);
+      linux_resume_one_lwp (lp, lp->step, GDB_SIGNAL_0);
       if (debug_linux_nat)
 	fprintf_unfiltered (gdb_stdlog,
 			    "LLW: %s %s, 0, 0 (discard SIGINT)\n",
 			    lp->step ?
 			    "PTRACE_SINGLESTEP" : "PTRACE_CONT",
 			    target_pid_to_str (lp->ptid));
-
-      lp->stopped = 0;
       gdb_assert (lp->resumed);
 
       /* Discard the event.  */
       return NULL;
     }
 
+  /* Don't report signals that GDB isn't interested in, such as
+     signals that are neither printed nor stopped upon.  Stopping all
+     threads can be a bit time-consuming so if we want decent
+     performance with heavily multi-threaded programs, especially when
+     they're using a high frequency timer, we'd better avoid it if we
+     can.  */
+  if (WIFSTOPPED (status))
+    {
+      enum gdb_signal signo = gdb_signal_from_host (WSTOPSIG (status));
+
+      if (!non_stop)
+	{
+	  /* Only do the below in all-stop, as we currently use SIGSTOP
+	     to implement target_stop (see linux_nat_stop) in
+	     non-stop.  */
+	  if (signo == GDB_SIGNAL_INT && signal_pass_state (signo) == 0)
+	    {
+	      /* If ^C/BREAK is typed at the tty/console, SIGINT gets
+		 forwarded to the entire process group, that is, all LWPs
+		 will receive it - unless they're using CLONE_THREAD to
+		 share signals.  Since we only want to report it once, we
+		 mark it as ignored for all LWPs except this one.  */
+	      iterate_over_lwps (pid_to_ptid (ptid_get_pid (lp->ptid)),
+					      set_ignore_sigint, NULL);
+	      lp->ignore_sigint = 0;
+	    }
+	  else
+	    maybe_clear_ignore_sigint (lp);
+	}
+
+      /* When using hardware single-step, we need to report every signal.
+	 Otherwise, signals in pass_mask may be short-circuited.  */
+      if (!lp->step
+	  && WSTOPSIG (status) && sigismember (&pass_mask, WSTOPSIG (status)))
+	{
+	  linux_resume_one_lwp (lp, lp->step, signo);
+	  if (debug_linux_nat)
+	    fprintf_unfiltered (gdb_stdlog,
+				"LLW: %s %s, %s (preempt 'handle')\n",
+				lp->step ?
+				"PTRACE_SINGLESTEP" : "PTRACE_CONT",
+				target_pid_to_str (lp->ptid),
+				(signo != GDB_SIGNAL_0
+				 ? strsignal (gdb_signal_to_host (signo))
+				 : "0"));
+	  return NULL;
+	}
+    }
+
   /* An interesting event.  */
   gdb_assert (lp);
   lp->status = status;
+  save_sigtrap (lp);
   return lp;
 }
 
@@ -3038,47 +3241,15 @@ linux_nat_wait_1 (struct target_ops *ops
   /* Make sure SIGCHLD is blocked until the sigsuspend below.  */
   block_child_signals (&prev_mask);
 
-retry:
-  lp = NULL;
-  status = 0;
-
   /* First check if there is a LWP with a wait status pending.  */
-  if (ptid_equal (ptid, minus_one_ptid) || ptid_is_pid (ptid))
-    {
-      /* Any LWP in the PTID group that's been resumed will do.  */
-      lp = iterate_over_lwps (ptid, status_callback, NULL);
-      if (lp)
-	{
-	  if (debug_linux_nat && lp->status)
-	    fprintf_unfiltered (gdb_stdlog,
-				"LLW: Using pending wait status %s for %s.\n",
-				status_to_str (lp->status),
-				target_pid_to_str (lp->ptid));
-	}
-    }
-  else if (ptid_lwp_p (ptid))
+  lp = iterate_over_lwps (ptid, status_callback, NULL);
+  if (lp != NULL)
     {
       if (debug_linux_nat)
 	fprintf_unfiltered (gdb_stdlog,
-			    "LLW: Waiting for specific LWP %s.\n",
-			    target_pid_to_str (ptid));
-
-      /* We have a specific LWP to check.  */
-      lp = find_lwp_pid (ptid);
-      gdb_assert (lp);
-
-      if (debug_linux_nat && lp->status)
-	fprintf_unfiltered (gdb_stdlog,
 			    "LLW: Using pending wait status %s for %s.\n",
 			    status_to_str (lp->status),
 			    target_pid_to_str (lp->ptid));
-
-      /* We check for lp->waitstatus in addition to lp->status,
-	 because we can have pending process exits recorded in
-	 lp->status and W_EXITCODE(0,0) == 0.  We should probably have
-	 an additional lp->status_p flag.  */
-      if (lp->status == 0 && lp->waitstatus.kind == TARGET_WAITKIND_IGNORE)
-	lp = NULL;
     }
 
   if (!target_can_async_p ())
@@ -3087,7 +3258,9 @@ retry:
       set_sigint_trap ();
     }
 
-  /* But if we don't find a pending event, we'll have to wait.  */
+  /* But if we don't find a pending event, we'll have to wait.  Always
+     pull all events out of the kernel.  We'll randomly select an
+     event LWP out of all that have events, to prevent starvation.  */
 
   while (lp == NULL)
     {
@@ -3118,10 +3291,6 @@ retry:
 
       if (lwpid > 0)
 	{
-	  /* If this is true, then we paused LWPs momentarily, and may
-	     now have pending events to handle.  */
-	  int new_pending;
-
 	  if (debug_linux_nat)
 	    {
 	      fprintf_unfiltered (gdb_stdlog,
@@ -3129,101 +3298,18 @@ retry:
 				  (long) lwpid, status_to_str (status));
 	    }
 
-	  lp = linux_nat_filter_event (lwpid, status, &new_pending);
-
-	  /* STATUS is now no longer valid, use LP->STATUS instead.  */
-	  status = 0;
-
-	  if (lp && !ptid_match (lp->ptid, ptid))
-	    {
-	      gdb_assert (lp->resumed);
-
-	      if (debug_linux_nat)
-		fprintf_unfiltered (gdb_stdlog,
-				    "LWP %ld got an event %06x, "
-				    "leaving pending.\n",
-				    ptid_get_lwp (lp->ptid), lp->status);
-
-	      if (WIFSTOPPED (lp->status))
-		{
-		  if (WSTOPSIG (lp->status) != SIGSTOP)
-		    {
-		      /* Cancel breakpoint hits.  The breakpoint may
-			 be removed before we fetch events from this
-			 process to report to the core.  It is best
-			 not to assume the moribund breakpoints
-			 heuristic always handles these cases --- it
-			 could be too many events go through to the
-			 core before this one is handled.  All-stop
-			 always cancels breakpoint hits in all
-			 threads.  */
-		      if (non_stop
-			  && linux_nat_lp_status_is_event (lp)
-			  && cancel_breakpoint (lp))
-			{
-			  /* Throw away the SIGTRAP.  */
-			  lp->status = 0;
-
-			  if (debug_linux_nat)
-			    fprintf_unfiltered (gdb_stdlog,
-						"LLW: LWP %ld hit a "
-						"breakpoint while "
-						"waiting for another "
-						"process; "
-						"cancelled it\n",
-						ptid_get_lwp (lp->ptid));
-			}
-		    }
-		  else
-		    lp->signalled = 0;
-		}
-	      else if (WIFEXITED (lp->status) || WIFSIGNALED (lp->status))
-		{
-		  if (debug_linux_nat)
-		    fprintf_unfiltered (gdb_stdlog,
-					"Process %ld exited while stopping "
-					"LWPs\n",
-					ptid_get_lwp (lp->ptid));
-
-		  /* This was the last lwp in the process.  Since
-		     events are serialized to GDB core, and we can't
-		     report this one right now, but GDB core and the
-		     other target layers will want to be notified
-		     about the exit code/signal, leave the status
-		     pending for the next time we're able to report
-		     it.  */
-
-		  /* Dead LWP's aren't expected to reported a pending
-		     sigstop.  */
-		  lp->signalled = 0;
-
-		  /* Store the pending event in the waitstatus as
-		     well, because W_EXITCODE(0,0) == 0.  */
-		  store_waitstatus (&lp->waitstatus, lp->status);
-		}
-
-	      /* Keep looking.  */
-	      lp = NULL;
-	    }
-
-	  if (new_pending)
-	    {
-	      /* Some LWP now has a pending event.  Go all the way
-		 back to check it.  */
-	      goto retry;
-	    }
-
-	  if (lp)
-	    {
-	      /* We got an event to report to the core.  */
-	      break;
-	    }
-
+	  linux_nat_filter_event (lwpid, status);
 	  /* Retry until nothing comes out of waitpid.  A single
 	     SIGCHLD can indicate more than one child stopped.  */
 	  continue;
 	}
 
+      /* Now that we've pulled all events out of the kernel, check if
+	 there's any LWP with a status to report to the core.  */
+      lp = iterate_over_lwps (ptid, status_callback, NULL);
+      if (lp != NULL)
+	break;
+
       /* Check for zombie thread group leaders.  Those can't be reaped
 	 until all other threads in the thread group are.  */
       check_zombie_leaders ();
@@ -3273,109 +3359,54 @@ retry:
   status = lp->status;
   lp->status = 0;
 
-  /* Don't report signals that GDB isn't interested in, such as
-     signals that are neither printed nor stopped upon.  Stopping all
-     threads can be a bit time-consuming so if we want decent
-     performance with heavily multi-threaded programs, especially when
-     they're using a high frequency timer, we'd better avoid it if we
-     can.  */
+  if (!non_stop)
+    {
+      /* Now stop all other LWP's ...  */
+      iterate_over_lwps (minus_one_ptid, stop_callback, NULL);
 
-  if (WIFSTOPPED (status))
+      /* ... and wait until all of them have reported back that
+	 they're no longer running.  */
+      iterate_over_lwps (minus_one_ptid, stop_wait_callback, NULL);
+    }
+
+  /* If we're not waiting for a specific LWP, choose an event LWP from
+     among those that have had events.  Giving equal priority to all
+     LWPs that have had events helps prevent starvation.  */
+  if (ptid_equal (ptid, minus_one_ptid) || ptid_is_pid (ptid))
+    select_event_lwp (ptid, &lp, &status);
+
+  gdb_assert (lp != NULL);
+
+  /* Now that we've selected our final event LWP, un-adjust its PC if
+     it was a software breakpoint.  */
+  if (lp->stop_reason == LWP_STOPPED_BY_SW_BREAKPOINT)
     {
-      enum gdb_signal signo = gdb_signal_from_host (WSTOPSIG (status));
+      struct regcache *regcache = get_thread_regcache (lp->ptid);
+      struct gdbarch *gdbarch = get_regcache_arch (regcache);
+      int decr_pc = target_decr_pc_after_break (gdbarch);
 
-      /* When using hardware single-step, we need to report every signal.
-	 Otherwise, signals in pass_mask may be short-circuited.  */
-      if (!lp->step
-	  && WSTOPSIG (status) && sigismember (&pass_mask, WSTOPSIG (status)))
+      if (decr_pc != 0)
 	{
-	  /* FIMXE: kettenis/2001-06-06: Should we resume all threads
-	     here?  It is not clear we should.  GDB may not expect
-	     other threads to run.  On the other hand, not resuming
-	     newly attached threads may cause an unwanted delay in
-	     getting them running.  */
-	  registers_changed ();
-	  if (linux_nat_prepare_to_resume != NULL)
-	    linux_nat_prepare_to_resume (lp);
-	  linux_ops->to_resume (linux_ops,
-				pid_to_ptid (ptid_get_lwp (lp->ptid)),
-				lp->step, signo);
-	  if (debug_linux_nat)
-	    fprintf_unfiltered (gdb_stdlog,
-				"LLW: %s %s, %s (preempt 'handle')\n",
-				lp->step ?
-				"PTRACE_SINGLESTEP" : "PTRACE_CONT",
-				target_pid_to_str (lp->ptid),
-				(signo != GDB_SIGNAL_0
-				 ? strsignal (gdb_signal_to_host (signo))
-				 : "0"));
-	  lp->stopped = 0;
-	  goto retry;
-	}
+	  CORE_ADDR pc;
 
-      if (!non_stop)
-	{
-	  /* Only do the below in all-stop, as we currently use SIGINT
-	     to implement target_stop (see linux_nat_stop) in
-	     non-stop.  */
-	  if (signo == GDB_SIGNAL_INT && signal_pass_state (signo) == 0)
-	    {
-	      /* If ^C/BREAK is typed at the tty/console, SIGINT gets
-		 forwarded to the entire process group, that is, all LWPs
-		 will receive it - unless they're using CLONE_THREAD to
-		 share signals.  Since we only want to report it once, we
-		 mark it as ignored for all LWPs except this one.  */
-	      iterate_over_lwps (pid_to_ptid (ptid_get_pid (ptid)),
-					      set_ignore_sigint, NULL);
-	      lp->ignore_sigint = 0;
-	    }
-	  else
-	    maybe_clear_ignore_sigint (lp);
+	  pc = regcache_read_pc (regcache);
+	  regcache_write_pc (regcache, pc + decr_pc);
 	}
     }
 
-  /* This LWP is stopped now.  */
-  lp->stopped = 1;
-
-  if (debug_linux_nat)
-    fprintf_unfiltered (gdb_stdlog, "LLW: Candidate event %s in %s.\n",
-			status_to_str (status), target_pid_to_str (lp->ptid));
+  /* We'll need this to determine whether to report a SIGSTOP as
+     GDB_SIGNAL_0.  Need to take a copy because resume_clear_callback
+     clears it.  */
+  last_resume_kind = lp->last_resume_kind;
 
   if (!non_stop)
     {
-      /* Now stop all other LWP's ...  */
-      iterate_over_lwps (minus_one_ptid, stop_callback, NULL);
-
-      /* ... and wait until all of them have reported back that
-	 they're no longer running.  */
-      iterate_over_lwps (minus_one_ptid, stop_wait_callback, NULL);
-
-      /* If we're not waiting for a specific LWP, choose an event LWP
-	 from among those that have had events.  Giving equal priority
-	 to all LWPs that have had events helps prevent
-	 starvation.  */
-      if (ptid_equal (ptid, minus_one_ptid) || ptid_is_pid (ptid))
-	select_event_lwp (ptid, &lp, &status);
-
-      /* Now that we've selected our final event LWP, cancel any
-	 breakpoints in other LWPs that have hit a GDB breakpoint.
-	 See the comment in cancel_breakpoints_callback to find out
-	 why.  */
-      iterate_over_lwps (minus_one_ptid, cancel_breakpoints_callback, lp);
-
-      /* We'll need this to determine whether to report a SIGSTOP as
-	 TARGET_WAITKIND_0.  Need to take a copy because
-	 resume_clear_callback clears it.  */
-      last_resume_kind = lp->last_resume_kind;
-
       /* In all-stop, from the core's perspective, all LWPs are now
 	 stopped until a new resume action is sent over.  */
       iterate_over_lwps (minus_one_ptid, resume_clear_callback, NULL);
     }
   else
     {
-      /* See above.  */
-      last_resume_kind = lp->last_resume_kind;
       resume_clear_callback (lp, NULL);
     }
 
@@ -3429,8 +3460,7 @@ resume_stopped_resumed_lwps (struct lwp_
 
   if (lp->stopped
       && lp->resumed
-      && lp->status == 0
-      && lp->waitstatus.kind == TARGET_WAITKIND_IGNORE)
+      && !lwp_status_pending_p (lp))
     {
       struct regcache *regcache = get_thread_regcache (lp->ptid);
       struct gdbarch *gdbarch = get_regcache_arch (regcache);
@@ -3453,13 +3483,7 @@ resume_stopped_resumed_lwps (struct lwp_
 			    paddress (gdbarch, pc),
 			    lp->step);
 
-      registers_changed ();
-      if (linux_nat_prepare_to_resume != NULL)
-	linux_nat_prepare_to_resume (lp);
-      linux_ops->to_resume (linux_ops, pid_to_ptid (ptid_get_lwp (lp->ptid)),
-			    lp->step, GDB_SIGNAL_0);
-      lp->stopped = 0;
-      lp->stopped_by_watchpoint = 0;
+      linux_resume_one_lwp (lp, lp->step, GDB_SIGNAL_0);
     }
 
   return 0;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/linux-nat.h ./gdb/linux-nat.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/linux-nat.h	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/linux-nat.h	2015-01-10 01:48:30.000000000 +0000
@@ -23,6 +23,24 @@
 
 struct arch_lwp_info;
 
+/* Reasons an LWP last stopped.  */
+
+enum lwp_stop_reason
+{
+  /* Either not stopped, or stopped for a reason that doesn't require
+     special tracking.  */
+  LWP_STOPPED_BY_NO_REASON,
+
+  /* Stopped by a software breakpoint.  */
+  LWP_STOPPED_BY_SW_BREAKPOINT,
+
+  /* Stopped by a hardware breakpoint.  */
+  LWP_STOPPED_BY_HW_BREAKPOINT,
+
+  /* Stopped by a watchpoint.  */
+  LWP_STOPPED_BY_WATCHPOINT
+};
+
 /* Structure describing an LWP.  This is public only for the purposes
    of ALL_LWPS; target-specific code should generally not access it
    directly.  */
@@ -33,6 +51,10 @@ struct lwp_info
      and overall process id.  */
   ptid_t ptid;
 
+  /* If this flag is set, we need to set the event request flags the
+     next time we see this LWP stop.  */
+  int must_set_ptrace_flags;
+
   /* Non-zero if this LWP is cloned.  In this context "cloned" means
      that the LWP is reporting to its parent using a signal other than
      SIGCHLD.  */
@@ -59,12 +81,19 @@ struct lwp_info
   /* If non-zero, a pending wait status.  */
   int status;
 
+  /* When 'stopped' is set, this is where the lwp last stopped, with
+     decr_pc_after_break already accounted for.  If the LWP is
+     running, and stepping, this is the address at which the lwp was
+     resumed (that is, it's the previous stop PC).  If the LWP is
+     running and not stepping, this is 0.  */
+  CORE_ADDR stop_pc;
+
   /* Non-zero if we were stepping this LWP.  */
   int step;
 
-  /* STOPPED_BY_WATCHPOINT is non-zero if this LWP stopped with a data
-     watchpoint trap.  */
-  int stopped_by_watchpoint;
+  /* The reason the LWP last stopped, if we need to track it
+     (breakpoint, watchpoint, etc.)  */
+  enum lwp_stop_reason stop_reason;
 
   /* On architectures where it is possible to know the data address of
      a triggered watchpoint, STOPPED_DATA_ADDRESS_P is non-zero, and
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/linux-thread-db.c ./gdb/linux-thread-db.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/linux-thread-db.c	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/linux-thread-db.c	2015-01-10 01:48:30.000000000 +0000
@@ -38,6 +38,7 @@
 #include "observer.h"
 #include "linux-nat.h"
 #include "nat/linux-procfs.h"
+#include "nat/linux-ptrace.h"
 #include "nat/linux-osdata.h"
 #include "auto-load.h"
 #include "cli/cli-utils.h"
@@ -77,6 +78,16 @@ static char *libthread_db_search_path;
    by the "set auto-load libthread-db" command.  */
 static int auto_load_thread_db = 1;
 
+/* Returns true if we need to use thread_db thread create/death event
+   breakpoints to learn about threads.  */
+
+static int
+thread_db_use_events (void)
+{
+  /* Not necessary if the kernel supports clone events.  */
+  return !linux_supports_traceclone ();
+}
+
 /* "show" command for the auto_load_thread_db configuration variable.  */
 
 static void
@@ -671,7 +682,7 @@ thread_db_find_new_threads_silently (pti
   if (except.reason < 0)
     {
       if (libthread_db_debug)
-	exception_fprintf (gdb_stderr, except,
+	exception_fprintf (gdb_stdlog, except,
 			   "Warning: thread_db_find_new_threads_silently: ");
 
       /* There is a bug fixed between nptl 2.6.1 and 2.7 by
@@ -753,8 +764,8 @@ try_thread_db_load_1 (struct thread_db_i
   if (err != TD_OK)
     {
       if (libthread_db_debug)
-	printf_unfiltered (_("td_ta_new failed: %s\n"),
-			   thread_db_err_str (err));
+	fprintf_unfiltered (gdb_stdlog, _("td_ta_new failed: %s\n"),
+			    thread_db_err_str (err));
       else
         switch (err)
           {
@@ -812,16 +823,22 @@ try_thread_db_load_1 (struct thread_db_i
 
   printf_unfiltered (_("[Thread debugging using libthread_db enabled]\n"));
 
-  if (libthread_db_debug || *libthread_db_search_path)
+  if (*libthread_db_search_path || libthread_db_debug)
     {
+      struct ui_file *file;
       const char *library;
 
       library = dladdr_to_soname (*info->td_ta_new_p);
       if (library == NULL)
 	library = LIBTHREAD_DB_SO;
 
-      printf_unfiltered (_("Using host libthread_db library \"%s\".\n"),
-			 library);
+      /* If we'd print this to gdb_stdout when debug output is
+	 disabled, still print it to gdb_stdout if debug output is
+	 enabled.  User visible output should not depend on debug
+	 settings.  */
+      file = *libthread_db_search_path != '\0' ? gdb_stdout : gdb_stdlog;
+      fprintf_unfiltered (file, _("Using host libthread_db library \"%s\".\n"),
+			  library);
     }
 
   /* The thread library was detected.  Activate the thread_db target
@@ -830,7 +847,7 @@ try_thread_db_load_1 (struct thread_db_i
     push_target (&thread_db_ops);
 
   /* Enable event reporting, but not when debugging a core file.  */
-  if (target_has_execution)
+  if (target_has_execution && thread_db_use_events ())
     enable_thread_event_reporting ();
 
   return 1;
@@ -846,8 +863,9 @@ try_thread_db_load (const char *library,
   struct thread_db_info *info;
 
   if (libthread_db_debug)
-    printf_unfiltered (_("Trying host libthread_db library: %s.\n"),
-                       library);
+    fprintf_unfiltered (gdb_stdlog,
+			_("Trying host libthread_db library: %s.\n"),
+			library);
 
   if (check_auto_load_safe)
     {
@@ -856,7 +874,8 @@ try_thread_db_load (const char *library,
 	  /* Do not print warnings by file_is_auto_load_safe if the library does
 	     not exist at this place.  */
 	  if (libthread_db_debug)
-	    printf_unfiltered (_("open failed: %s.\n"), safe_strerror (errno));
+	    fprintf_unfiltered (gdb_stdlog, _("open failed: %s.\n"),
+				safe_strerror (errno));
 	  return 0;
 	}
 
@@ -871,7 +890,7 @@ try_thread_db_load (const char *library,
   if (handle == NULL)
     {
       if (libthread_db_debug)
-	printf_unfiltered (_("dlopen failed: %s.\n"), dlerror ());
+	fprintf_unfiltered (gdb_stdlog, _("dlopen failed: %s.\n"), dlerror ());
       return 0;
     }
 
@@ -885,7 +904,7 @@ try_thread_db_load (const char *library,
           const char *const libpath = dladdr_to_soname (td_init);
 
           if (libpath != NULL)
-            printf_unfiltered (_("Host %s resolved to: %s.\n"),
+            fprintf_unfiltered (gdb_stdlog, _("Host %s resolved to: %s.\n"),
                                library, libpath);
         }
     }
@@ -1076,7 +1095,8 @@ thread_db_load_search (void)
 
   do_cleanups (cleanups);
   if (libthread_db_debug)
-    printf_unfiltered (_("thread_db_load_search returning %d\n"), rc);
+    fprintf_unfiltered (gdb_stdlog,
+			_("thread_db_load_search returning %d\n"), rc);
   return rc;
 }
 
@@ -1255,6 +1275,17 @@ thread_db_inferior_created (struct targe
   check_for_thread_db ();
 }
 
+/* Update the thread's state (what's displayed in "info threads"),
+   from libthread_db thread state information.  */
+
+static void
+update_thread_state (struct private_thread_info *private,
+		     const td_thrinfo_t *ti_p)
+{
+  private->dying = (ti_p->ti_state == TD_THR_UNKNOWN
+		    || ti_p->ti_state == TD_THR_ZOMBIE);
+}
+
 /* Attach to a new thread.  This function is called when we receive a
    TD_CREATE event or when we iterate over all threads and find one
    that wasn't already in our list.  Returns true on success.  */
@@ -1336,8 +1367,7 @@ attach_thread (ptid_t ptid, const td_thr
   gdb_assert (ti_p->ti_tid != 0);
   private->th = *th_p;
   private->tid = ti_p->ti_tid;
-  if (ti_p->ti_state == TD_THR_UNKNOWN || ti_p->ti_state == TD_THR_ZOMBIE)
-    private->dying = 1;
+  update_thread_state (private, ti_p);
 
   /* Add the thread to GDB's thread list.  */
   if (tp == NULL)
@@ -1349,7 +1379,7 @@ attach_thread (ptid_t ptid, const td_thr
 
   /* Enable thread event reporting for this thread, except when
      debugging a core file.  */
-  if (target_has_execution)
+  if (target_has_execution && thread_db_use_events ())
     {
       err = info->td_thr_event_enable_p (th_p, 1);
       if (err != TD_OK)
@@ -1388,7 +1418,7 @@ thread_db_detach (struct target_ops *ops
 
   if (info)
     {
-      if (target_has_execution)
+      if (target_has_execution && thread_db_use_events ())
 	{
 	  disable_thread_event_reporting (info);
 
@@ -1601,6 +1631,17 @@ find_new_threads_callback (const td_thrh
     error (_("find_new_threads_callback: cannot get thread info: %s"),
 	   thread_db_err_str (err));
 
+  if (ti.ti_lid == -1)
+    {
+      /* A thread with kernel thread ID -1 is either a thread that
+	 exited and was joined, or a thread that is being created but
+	 hasn't started yet, and that is reusing the tcb/stack of a
+	 thread that previously exited and was joined.  (glibc marks
+	 terminated and joined threads with kernel thread ID -1.  See
+	 glibc PR17707.  */
+      return 0;
+    }
+
   if (ti.ti_tid == 0)
     {
       /* A thread ID of zero means that this is the main thread, but
@@ -1613,7 +1654,7 @@ find_new_threads_callback (const td_thrh
 	 need this glibc bug workaround.  */
       info->need_stale_parent_threads_check = 0;
 
-      if (target_has_execution)
+      if (target_has_execution && thread_db_use_events ())
 	{
 	  err = info->td_thr_event_enable_p (th_p, 1);
 	  if (err != TD_OK)
@@ -1650,6 +1691,12 @@ find_new_threads_callback (const td_thrh
 	   iteration: thread_db_find_new_threads_2 will retry.  */
 	return 1;
     }
+  else if (target_has_execution && !thread_db_use_events ())
+    {
+      /* Need to update this if not using the libthread_db events
+	 (particularly, the TD_DEATH event).  */
+      update_thread_state (tp->private, &ti);
+    }
 
   return 0;
 }
@@ -1683,11 +1730,12 @@ find_new_threads_once (struct thread_db_
   if (libthread_db_debug)
     {
       if (except.reason < 0)
-	exception_fprintf (gdb_stderr, except,
+	exception_fprintf (gdb_stdlog, except,
 			   "Warning: find_new_threads_once: ");
 
-      printf_filtered (_("Found %d new threads in iteration %d.\n"),
-		       data.new_threads, iteration);
+      fprintf_unfiltered (gdb_stdlog,
+			  _("Found %d new threads in iteration %d.\n"),
+			  data.new_threads, iteration);
     }
 
   if (errp != NULL)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/Makefile.in ./gdb/Makefile.in
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/Makefile.in	2015-01-09 01:48:36.000000000 +0000
+++ ./gdb/Makefile.in	2015-01-10 01:48:29.000000000 +0000
@@ -1858,7 +1858,6 @@ po/$(PACKAGE).pot: force
 	     -e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
 	     -e 's/\([ \t;,(]\)free$$/\1xfree/g' \
 	     -e '/^#line.*y.tab.c/d' \
-	     -e "s/^\(#line.*\)`basename $<`/\1`echo $<|sed 's/\//\\\\\//g'`/" \
 	  < $@.tmp > $@
 	rm -f $@.tmp
 .l.c:
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/nat/linux-procfs.c ./gdb/nat/linux-procfs.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/nat/linux-procfs.c	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/nat/linux-procfs.c	2015-01-10 01:48:30.000000000 +0000
@@ -19,12 +19,13 @@
 #include "common-defs.h"
 #include "linux-procfs.h"
 #include "filestuff.h"
+#include <dirent.h>
 
 /* Return the TGID of LWPID from /proc/pid/status.  Returns -1 if not
    found.  */
 
 static int
-linux_proc_get_int (pid_t lwpid, const char *field)
+linux_proc_get_int (pid_t lwpid, const char *field, int warn)
 {
   size_t field_len = strlen (field);
   FILE *status_file;
@@ -35,7 +36,8 @@ linux_proc_get_int (pid_t lwpid, const c
   status_file = gdb_fopen_cloexec (buf, "r");
   if (status_file == NULL)
     {
-      warning (_("unable to open /proc file '%s'"), buf);
+      if (warn)
+	warning (_("unable to open /proc file '%s'"), buf);
       return -1;
     }
 
@@ -56,45 +58,87 @@ linux_proc_get_int (pid_t lwpid, const c
 int
 linux_proc_get_tgid (pid_t lwpid)
 {
-  return linux_proc_get_int (lwpid, "Tgid");
+  return linux_proc_get_int (lwpid, "Tgid", 1);
 }
 
 /* See linux-procfs.h.  */
 
 pid_t
-linux_proc_get_tracerpid (pid_t lwpid)
+linux_proc_get_tracerpid_nowarn (pid_t lwpid)
 {
-  return linux_proc_get_int (lwpid, "TracerPid");
+  return linux_proc_get_int (lwpid, "TracerPid", 0);
 }
 
-/* Return non-zero if 'State' of /proc/PID/status contains STATE.  */
+/* Fill in BUFFER, a buffer with BUFFER_SIZE bytes with the 'State'
+   line of /proc/PID/status.  Returns -1 on failure to open the /proc
+   file, 1 if the line is found, and 0 if not found.  If WARN, warn on
+   failure to open the /proc file.  */
 
 static int
-linux_proc_pid_has_state (pid_t pid, const char *state)
+linux_proc_pid_get_state (pid_t pid, char *buffer, size_t buffer_size,
+			  int warn)
 {
-  char buffer[100];
   FILE *procfile;
-  int retval;
   int have_state;
 
-  xsnprintf (buffer, sizeof (buffer), "/proc/%d/status", (int) pid);
+  xsnprintf (buffer, buffer_size, "/proc/%d/status", (int) pid);
   procfile = gdb_fopen_cloexec (buffer, "r");
   if (procfile == NULL)
     {
-      warning (_("unable to open /proc file '%s'"), buffer);
-      return 0;
+      if (warn)
+	warning (_("unable to open /proc file '%s'"), buffer);
+      return -1;
     }
 
   have_state = 0;
-  while (fgets (buffer, sizeof (buffer), procfile) != NULL)
+  while (fgets (buffer, buffer_size, procfile) != NULL)
     if (strncmp (buffer, "State:", 6) == 0)
       {
 	have_state = 1;
 	break;
       }
-  retval = (have_state && strstr (buffer, state) != NULL);
   fclose (procfile);
-  return retval;
+  return have_state;
+}
+
+/* See linux-procfs.h declaration.  */
+
+int
+linux_proc_pid_is_gone (pid_t pid)
+{
+  char buffer[100];
+  int have_state;
+
+  have_state = linux_proc_pid_get_state (pid, buffer, sizeof buffer, 0);
+  if (have_state < 0)
+    {
+      /* If we can't open the status file, assume the thread has
+	 disappeared.  */
+      return 1;
+    }
+  else if (have_state == 0)
+    {
+      /* No "State:" line, assume thread is alive.  */
+      return 0;
+    }
+  else
+    {
+      return (strstr (buffer, "Z (") != NULL
+	      || strstr (buffer, "X (") != NULL);
+    }
+}
+
+/* Return non-zero if 'State' of /proc/PID/status contains STATE.  If
+   WARN, warn on failure to open the /proc file.  */
+
+static int
+linux_proc_pid_has_state (pid_t pid, const char *state, int warn)
+{
+  char buffer[100];
+  int have_state;
+
+  have_state = linux_proc_pid_get_state (pid, buffer, sizeof buffer, warn);
+  return (have_state > 0 && strstr (buffer, state) != NULL);
 }
 
 /* Detect `T (stopped)' in `/proc/PID/status'.
@@ -103,7 +147,24 @@ linux_proc_pid_has_state (pid_t pid, con
 int
 linux_proc_pid_is_stopped (pid_t pid)
 {
-  return linux_proc_pid_has_state (pid, "T (stopped)");
+  return linux_proc_pid_has_state (pid, "T (stopped)", 1);
+}
+
+/* Return non-zero if PID is a zombie.  If WARN, warn on failure to
+   open the /proc file.  */
+
+static int
+linux_proc_pid_is_zombie_maybe_warn (pid_t pid, int warn)
+{
+  return linux_proc_pid_has_state (pid, "Z (zombie)", warn);
+}
+
+/* See linux-procfs.h declaration.  */
+
+int
+linux_proc_pid_is_zombie_nowarn (pid_t pid)
+{
+  return linux_proc_pid_is_zombie_maybe_warn (pid, 0);
 }
 
 /* See linux-procfs.h declaration.  */
@@ -111,7 +172,7 @@ linux_proc_pid_is_stopped (pid_t pid)
 int
 linux_proc_pid_is_zombie (pid_t pid)
 {
-  return linux_proc_pid_has_state (pid, "Z (zombie)");
+  return linux_proc_pid_is_zombie_maybe_warn (pid, 1);
 }
 
 /* See linux-procfs.h declaration.  */
@@ -132,3 +193,61 @@ linux_proc_pid_get_ns (pid_t pid, const 
 
   return NULL;
 }
+
+/* See linux-procfs.h.  */
+
+void
+linux_proc_attach_tgid_threads (pid_t pid,
+				linux_proc_attach_lwp_func attach_lwp)
+{
+  DIR *dir;
+  char pathname[128];
+  int new_threads_found;
+  int iterations;
+
+  if (linux_proc_get_tgid (pid) != pid)
+    return;
+
+  xsnprintf (pathname, sizeof (pathname), "/proc/%ld/task", (long) pid);
+  dir = opendir (pathname);
+  if (dir == NULL)
+    {
+      warning (_("Could not open /proc/%ld/task.\n"), (long) pid);
+      return;
+    }
+
+  /* Scan the task list for existing threads.  While we go through the
+     threads, new threads may be spawned.  Cycle through the list of
+     threads until we have done two iterations without finding new
+     threads.  */
+  for (iterations = 0; iterations < 2; iterations++)
+    {
+      struct dirent *dp;
+
+      new_threads_found = 0;
+      while ((dp = readdir (dir)) != NULL)
+	{
+	  unsigned long lwp;
+
+	  /* Fetch one lwp.  */
+	  lwp = strtoul (dp->d_name, NULL, 10);
+	  if (lwp != 0)
+	    {
+	      ptid_t ptid = ptid_build (pid, lwp, 0);
+
+	      if (attach_lwp (ptid))
+		new_threads_found = 1;
+	    }
+	}
+
+      if (new_threads_found)
+	{
+	  /* Start over.  */
+	  iterations = -1;
+	}
+
+      rewinddir (dir);
+    }
+
+  closedir (dir);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/nat/linux-procfs.h ./gdb/nat/linux-procfs.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/nat/linux-procfs.h	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/nat/linux-procfs.h	2015-01-10 01:48:30.000000000 +0000
@@ -22,28 +22,50 @@
 #include <unistd.h>
 
 /* Return the TGID of LWPID from /proc/pid/status.  Returns -1 if not
-   found.  */
+   found.  Failure to open the /proc file results in a warning.  */
 
 extern int linux_proc_get_tgid (pid_t lwpid);
 
-/* Return the TracerPid of LWPID from /proc/pid/status.  Returns -1 if not
-   found.  */
+/* Return the TracerPid of LWPID from /proc/pid/status.  Returns -1 if
+   not found.  Does not warn on failure to open the /proc file.  */
 
-extern pid_t linux_proc_get_tracerpid (pid_t lwpid);
+extern pid_t linux_proc_get_tracerpid_nowarn (pid_t lwpid);
 
 /* Detect `T (stopped)' in `/proc/PID/status'.
    Other states including `T (tracing stop)' are reported as false.  */
 
 extern int linux_proc_pid_is_stopped (pid_t pid);
 
-/* Return non-zero if PID is a zombie.  */
+/* Return non-zero if PID is a zombie.  Failure to open the
+   /proc/pid/status file results in a warning.  */
 
 extern int linux_proc_pid_is_zombie (pid_t pid);
 
+/* Return non-zero if PID is a zombie.  Does not warn on failure to
+   open the /proc file.  */
+
+extern int linux_proc_pid_is_zombie_nowarn (pid_t pid);
+
+/* Return non-zero if /proc/PID/status indicates that PID is gone
+   (i.e., in Z/Zombie or X/Dead state).  Failure to open the /proc
+   file is assumed to indicate the thread is gone.  */
+
+extern int linux_proc_pid_is_gone (pid_t pid);
+
 /* Return an opaque string identifying PID's NS namespace or NULL if
  * the information is unavailable.  The returned string must be
  * released with xfree.  */
 
 extern char *linux_proc_pid_get_ns (pid_t pid, const char *ns);
 
+/* Callback function for linux_proc_attach_tgid_threads.  If the PTID
+   thread is not yet known, try to attach to it and return true,
+   otherwise return false.  */
+typedef int (*linux_proc_attach_lwp_func) (ptid_t ptid);
+
+/* If PID is a tgid, scan the /proc/PID/task/ directory for existing
+   threads, and call FUNC for each thread found.  */
+extern void linux_proc_attach_tgid_threads (pid_t pid,
+					    linux_proc_attach_lwp_func func);
+
 #endif /* COMMON_LINUX_PROCFS_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/nat/linux-ptrace.c ./gdb/nat/linux-ptrace.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/nat/linux-ptrace.c	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/nat/linux-ptrace.c	2015-01-10 01:48:30.000000000 +0000
@@ -43,18 +43,44 @@ linux_ptrace_attach_fail_reason (pid_t p
 {
   pid_t tracerpid;
 
-  tracerpid = linux_proc_get_tracerpid (pid);
+  tracerpid = linux_proc_get_tracerpid_nowarn (pid);
   if (tracerpid > 0)
     buffer_xml_printf (buffer, _("process %d is already traced "
 				 "by process %d"),
 		       (int) pid, (int) tracerpid);
 
-  if (linux_proc_pid_is_zombie (pid))
+  if (linux_proc_pid_is_zombie_nowarn (pid))
     buffer_xml_printf (buffer, _("process %d is a zombie "
 				 "- the process has already terminated"),
 		       (int) pid);
 }
 
+/* See linux-ptrace.h.  */
+
+char *
+linux_ptrace_attach_fail_reason_string (ptid_t ptid, int err)
+{
+  static char *reason_string;
+  struct buffer buffer;
+  char *warnings;
+  long lwpid = ptid_get_lwp (ptid);
+
+  xfree (reason_string);
+
+  buffer_init (&buffer);
+  linux_ptrace_attach_fail_reason (lwpid, &buffer);
+  buffer_grow_str0 (&buffer, "");
+  warnings = buffer_finish (&buffer);
+  if (warnings[0] != '\0')
+    reason_string = xstrprintf ("%s (%d), %s",
+				strerror (err), err, warnings);
+  else
+    reason_string = xstrprintf ("%s (%d)",
+				strerror (err), err);
+  xfree (warnings);
+  return reason_string;
+}
+
 #if defined __i386__ || defined __x86_64__
 
 /* Address of the 'ret' instruction in asm code block below.  */
@@ -508,7 +534,8 @@ linux_disable_event_reporting (pid_t pid
 static int
 ptrace_supports_feature (int ptrace_options)
 {
-  gdb_assert (current_ptrace_options >= 0);
+  if (current_ptrace_options == -1)
+    linux_check_ptrace_features ();
 
   return ((current_ptrace_options & ptrace_options) == ptrace_options);
 }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/nat/linux-ptrace.h ./gdb/nat/linux-ptrace.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/nat/linux-ptrace.h	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/nat/linux-ptrace.h	2015-01-10 01:48:30.000000000 +0000
@@ -89,6 +89,14 @@ struct buffer;
 #endif
 
 extern void linux_ptrace_attach_fail_reason (pid_t pid, struct buffer *buffer);
+
+/* Find all possible reasons we could have failed to attach to PTID
+   and return them as a string.  ERR is the error PTRACE_ATTACH failed
+   with (an errno).  The result is stored in a static buffer.  This
+   string should be copied into a buffer by the client if the string
+   will not be immediately used, or if it must persist.  */
+extern char *linux_ptrace_attach_fail_reason_string (ptid_t ptid, int err);
+
 extern void linux_ptrace_init_warnings (void);
 extern void linux_enable_event_reporting (pid_t pid, int attached);
 extern void linux_disable_event_reporting (pid_t pid);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/po/gdb.pot ./gdb/po/gdb.pot
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/po/gdb.pot	2015-01-09 01:52:24.000000000 +0000
+++ ./gdb/po/gdb.pot	2015-01-10 01:51:13.000000000 +0000
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-01-09 01:52+0000\n"
+"POT-Creation-Date: 2015-01-10 01:51+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -745,8 +745,8 @@ msgstr ""
 msgid "condition missing after `if' keyword"
 msgstr ""
 
-#: ada-lang.c:12712 break-catch-throw.c:471 breakpoint.c:9872
-#: breakpoint.c:11813 breakpoint.c:11957 breakpoint.c:12002 breakpoint.c:15666
+#: ada-lang.c:12712 break-catch-throw.c:471 breakpoint.c:9905
+#: breakpoint.c:11846 breakpoint.c:11990 breakpoint.c:12035 breakpoint.c:15699
 msgid "Junk at end of arguments."
 msgstr ""
 
@@ -3222,7 +3222,7 @@ msgid ""
 "defined for this breakpoint."
 msgstr ""
 
-#: breakpoint.c:1108 breakpoint.c:14810
+#: breakpoint.c:1108 breakpoint.c:14843
 #, possible-c-format
 msgid "No breakpoint number %d."
 msgstr ""
@@ -3342,393 +3342,393 @@ msgstr ""
 msgid "Could not remove hardware watchpoint %d."
 msgstr ""
 
-#: breakpoint.c:4658
+#: breakpoint.c:4691
 msgid "<unreadable>"
 msgstr ""
 
-#: breakpoint.c:4705
+#: breakpoint.c:4738
 msgid "print_bp_stop_message: unrecognized enum value"
 msgstr ""
 
-#: breakpoint.c:4724
+#: breakpoint.c:4757
 msgid "Stopped due to shared library event:\n"
 msgstr ""
 
-#: breakpoint.c:4727
+#: breakpoint.c:4760
 msgid "Stopped due to shared library event (no libraries added or removed)\n"
 msgstr ""
 
-#: breakpoint.c:4741
+#: breakpoint.c:4774
 msgid "  Inferior unloaded "
 msgstr ""
 
-#: breakpoint.c:4764
+#: breakpoint.c:4797
 msgid "  Inferior loaded "
 msgstr ""
 
 #. Error from catch_errors.
-#: breakpoint.c:5271
+#: breakpoint.c:5304
 #, possible-c-format
 msgid "Watchpoint %d deleted.\n"
 msgstr ""
 
-#: breakpoint.c:5402
+#: breakpoint.c:5435
 msgid "Watchpoint condition cannot be tested in the current scope"
 msgstr ""
 
-#: breakpoint.c:5774
+#: breakpoint.c:5807
 msgid "bpstat_what: tracepoint encountered"
 msgstr ""
 
-#: breakpoint.c:5795
+#: breakpoint.c:5828
 #, possible-c-format
 msgid "bpstat_what: unhandled bptype %d"
 msgstr ""
 
-#: breakpoint.c:6064
+#: breakpoint.c:6097
 #, possible-c-format
 msgid "bptypes table does not describe type #%d."
 msgstr ""
 
-#: breakpoint.c:6198
+#: breakpoint.c:6231
 msgid "print_one_breakpoint: bp_none encountered\n"
 msgstr ""
 
-#: breakpoint.c:6834
+#: breakpoint.c:6867
 msgid "Note: breakpoint "
 msgstr ""
 
 #. if (others == ???)
-#: breakpoint.c:6836
+#: breakpoint.c:6869
 msgid "Note: breakpoints "
 msgstr ""
 
-#: breakpoint.c:6854
+#: breakpoint.c:6887
 msgid "also set at pc "
 msgstr ""
 
-#: breakpoint.c:7031
+#: breakpoint.c:7064
 #, possible-c-format
 msgid "Breakpoint %d address previously adjusted from %s to %s."
 msgstr ""
 
-#: breakpoint.c:7034
+#: breakpoint.c:7067
 #, possible-c-format
 msgid "Breakpoint address adjusted from %s to %s."
 msgstr ""
 
-#: breakpoint.c:7150
+#: breakpoint.c:7183
 msgid "unknown breakpoint type"
 msgstr ""
 
-#: breakpoint.c:7779
+#: breakpoint.c:7812
 #, possible-c-format
 msgid "Temporarily disabling breakpoints for unloaded shared library \"%s\""
 msgstr ""
 
-#: breakpoint.c:7980
+#: breakpoint.c:8013
 #, possible-c-format
 msgid "Catchpoint %d (fork)"
 msgstr ""
 
-#: breakpoint.c:8096
+#: breakpoint.c:8129
 #, possible-c-format
 msgid "Catchpoint %d (vfork)"
 msgstr ""
 
-#: breakpoint.c:8273
+#: breakpoint.c:8306
 #, possible-c-format
 msgid "load of library matching %s"
 msgstr ""
 
-#: breakpoint.c:8275
+#: breakpoint.c:8308
 msgid "load of library"
 msgstr ""
 
-#: breakpoint.c:8280
+#: breakpoint.c:8313
 #, possible-c-format
 msgid "unload of library matching %s"
 msgstr ""
 
-#: breakpoint.c:8282
+#: breakpoint.c:8315
 msgid "unload of library"
 msgstr ""
 
-#: breakpoint.c:8297
+#: breakpoint.c:8330
 #, possible-c-format
 msgid "Catchpoint %d (%s)"
 msgstr ""
 
-#: breakpoint.c:8347 objc-lang.c:589 objc-lang.c:740 symtab.c:3816
+#: breakpoint.c:8380 objc-lang.c:589 objc-lang.c:740 symtab.c:3816
 #: thread.c:1567
 #, possible-c-format
 msgid "Invalid regexp (%s): %s"
 msgstr ""
 
-#: breakpoint.c:8719
+#: breakpoint.c:8752
 #, possible-c-format
 msgid "Catchpoint %d (syscalls"
 msgstr ""
 
-#: breakpoint.c:8721
+#: breakpoint.c:8754
 #, possible-c-format
 msgid "Catchpoint %d (syscall"
 msgstr ""
 
-#: breakpoint.c:8738
+#: breakpoint.c:8771
 #, possible-c-format
 msgid "Catchpoint %d (any syscall)"
 msgstr ""
 
-#: breakpoint.c:8950
+#: breakpoint.c:8983
 #, possible-c-format
 msgid "Catchpoint %d (exec)"
 msgstr ""
 
-#: breakpoint.c:9354 printcmd.c:2259
+#: breakpoint.c:9387 printcmd.c:2259
 msgid "Bad format string, missing '\"'."
 msgstr ""
 
-#: breakpoint.c:9361
+#: breakpoint.c:9394
 msgid "No function supplied for dprintf call"
 msgstr ""
 
-#: breakpoint.c:9379
+#: breakpoint.c:9412
 msgid "Target cannot run dprintf commands, falling back to GDB printf"
 msgstr ""
 
-#: breakpoint.c:9385
+#: breakpoint.c:9418
 msgid "Invalid dprintf style."
 msgstr ""
 
-#: breakpoint.c:9446 breakpoint.c:15028
+#: breakpoint.c:9479 breakpoint.c:15061
 msgid "No hardware breakpoint support in the target."
 msgstr ""
 
-#: breakpoint.c:9448 breakpoint.c:10577 breakpoint.c:15030
+#: breakpoint.c:9481 breakpoint.c:10610 breakpoint.c:15063
 msgid "Hardware breakpoints used exceeds limit."
 msgstr ""
 
-#: breakpoint.c:9503 breakpoint.c:9512
+#: breakpoint.c:9536 breakpoint.c:9545
 #, possible-c-format
 msgid "Probed static tracepoint marker \"%s\"\n"
 msgstr ""
 
-#: breakpoint.c:9517
+#: breakpoint.c:9550
 msgid "Couldn't determine the static tracepoint marker to probe"
 msgstr ""
 
-#: breakpoint.c:9537
+#: breakpoint.c:9570
 #, possible-c-format
 msgid "Garbage '%s' follows condition"
 msgstr ""
 
-#: breakpoint.c:9547 breakpoint.c:13814
+#: breakpoint.c:9580 breakpoint.c:13847
 msgid "Format string required"
 msgstr ""
 
-#: breakpoint.c:9550
+#: breakpoint.c:9583
 #, possible-c-format
 msgid "Garbage '%s' at end of command"
 msgstr ""
 
-#: breakpoint.c:9709
+#: breakpoint.c:9742
 msgid "No default breakpoint address now."
 msgstr ""
 
-#: breakpoint.c:9781
+#: breakpoint.c:9814
 #, possible-c-format
 msgid "May not have a fast tracepoint at 0x%s%s"
 msgstr ""
 
-#: breakpoint.c:9793 thread.c:1487
+#: breakpoint.c:9826 thread.c:1487
 #, possible-c-format
 msgid "Unknown thread %d."
 msgstr ""
 
-#: breakpoint.c:9849
+#: breakpoint.c:9882
 msgid "Junk after thread keyword."
 msgstr ""
 
-#: breakpoint.c:9861
+#: breakpoint.c:9894
 msgid "Junk after task keyword."
 msgstr ""
 
-#: breakpoint.c:9863
+#: breakpoint.c:9896
 #, possible-c-format
 msgid "Unknown task %d."
 msgstr ""
 
-#: breakpoint.c:9898
+#: breakpoint.c:9931
 #, possible-c-format
 msgid "No known static tracepoint marker named %s"
 msgstr ""
 
-#: breakpoint.c:9989
+#: breakpoint.c:10022
 #, possible-c-format
 msgid "Make %s pending on future shared library load? "
 msgstr ""
 
-#: breakpoint.c:10076
+#: breakpoint.c:10109
 #, possible-c-format
 msgid "Garbage '%s' at end of location"
 msgstr ""
 
-#: breakpoint.c:10143
+#: breakpoint.c:10176
 msgid ""
 "Multiple breakpoints were set.\n"
 "Use the \"delete\" command to delete unwanted breakpoints."
 msgstr ""
 
-#: breakpoint.c:10206 linespec.c:1977
+#: breakpoint.c:10239 linespec.c:1977
 #, possible-c-format
 msgid "No line %d in file \"%s\"."
 msgstr ""
 
-#: breakpoint.c:10282
+#: breakpoint.c:10315
 msgid ""
 "Specify the type of breakpoint to set.\n"
 "Usage: stop in <function | address>\n"
 "       stop at <line>\n"
 msgstr ""
 
-#: breakpoint.c:10315
+#: breakpoint.c:10348
 msgid "Usage: stop in <function | address>\n"
 msgstr ""
 
-#: breakpoint.c:10347
+#: breakpoint.c:10380
 msgid "Usage: stop at <line>\n"
 msgstr ""
 
-#: breakpoint.c:10376
+#: breakpoint.c:10409
 msgid "May only run agent-printf on the target"
 msgstr ""
 
-#: breakpoint.c:10504
+#: breakpoint.c:10537
 #, possible-c-format
 msgid "Hardware assisted ranged breakpoint %d from %s to %s."
 msgstr ""
 
-#: breakpoint.c:10545 breakpoint.c:10625
+#: breakpoint.c:10578 breakpoint.c:10658
 msgid "Could not find location of the end of the range."
 msgstr ""
 
-#: breakpoint.c:10570
+#: breakpoint.c:10603
 msgid "This target does not support hardware ranged breakpoints."
 msgstr ""
 
-#: breakpoint.c:10581
+#: breakpoint.c:10614
 msgid "No address range specified."
 msgstr ""
 
-#: breakpoint.c:10591
+#: breakpoint.c:10624
 msgid "Too few arguments."
 msgstr ""
 
-#: breakpoint.c:10593
+#: breakpoint.c:10626
 msgid "Could not find location of the beginning of the range."
 msgstr ""
 
-#: breakpoint.c:10599 breakpoint.c:10630
+#: breakpoint.c:10632 breakpoint.c:10663
 msgid "Cannot create a ranged breakpoint with multiple locations."
 msgstr ""
 
-#: breakpoint.c:10638
+#: breakpoint.c:10671
 msgid "Invalid address range, end precedes start."
 msgstr ""
 
 #. Length overflowed.
-#: breakpoint.c:10643
+#: breakpoint.c:10676
 msgid "Address range too large."
 msgstr ""
 
-#: breakpoint.c:11034 breakpoint.c:11171 breakpoint.c:11227 breakpoint.c:11258
+#: breakpoint.c:11067 breakpoint.c:11204 breakpoint.c:11260 breakpoint.c:11291
 msgid "Invalid hardware watchpoint type."
 msgstr ""
 
-#: breakpoint.c:11065
+#: breakpoint.c:11098
 msgid "Invalid watchpoint type."
 msgstr ""
 
-#: breakpoint.c:11175
+#: breakpoint.c:11208
 msgid ""
 "\n"
 "Check the underlying instruction at PC for the memory\n"
 "address and value which triggered this watchpoint.\n"
 msgstr ""
 
-#: breakpoint.c:11351
+#: breakpoint.c:11384
 msgid "You can specify only one thread."
 msgstr ""
 
-#: breakpoint.c:11359
+#: breakpoint.c:11392
 #, possible-c-format
 msgid "Invalid thread ID specification %s."
 msgstr ""
 
-#: breakpoint.c:11373
+#: breakpoint.c:11406
 msgid "You can specify only one mask."
 msgstr ""
 
-#: breakpoint.c:11417
+#: breakpoint.c:11450
 #, possible-c-format
 msgid "Cannot watch constant value `%.*s'."
 msgstr ""
 
-#: breakpoint.c:11444
+#: breakpoint.c:11477
 msgid "This target does not support masked watchpoints."
 msgstr ""
 
-#: breakpoint.c:11446
+#: breakpoint.c:11479
 msgid "Invalid mask or memory region."
 msgstr ""
 
-#: breakpoint.c:11472
+#: breakpoint.c:11505
 msgid "Junk at end of command."
 msgstr ""
 
-#: breakpoint.c:11807
+#: breakpoint.c:11840
 msgid "Couldn't get information on specified line."
 msgstr ""
 
-#: breakpoint.c:11974
+#: breakpoint.c:12007
 msgid "unsupported or unknown fork kind; cannot catch it"
 msgstr ""
 
 #. Here we have to issue an error instead of a warning,
 #. because GDB cannot do anything useful if there's no
 #. syscall number to be caught.
-#: breakpoint.c:12086
+#: breakpoint.c:12119
 #, possible-c-format
 msgid "Unknown syscall name '%s'."
 msgstr ""
 
-#: breakpoint.c:12110
+#: breakpoint.c:12143
 msgid "The feature 'catch syscall' is not supported on this architecture yet."
 msgstr ""
 
-#: breakpoint.c:12141 breakpoint.c:12148
+#: breakpoint.c:12174 breakpoint.c:12181
 msgid "Catch requires an event name."
 msgstr ""
 
-#: breakpoint.c:12207
+#: breakpoint.c:12240
 msgid "No source file specified."
 msgstr ""
 
-#: breakpoint.c:12305
+#: breakpoint.c:12338
 #, possible-c-format
 msgid "No breakpoint at %s."
 msgstr ""
 
-#: breakpoint.c:12307
+#: breakpoint.c:12340
 msgid "No breakpoint at this line."
 msgstr ""
 
-#: breakpoint.c:12330
+#: breakpoint.c:12363
 msgid "Deleted breakpoint "
 msgstr ""
 
-#: breakpoint.c:12332
+#: breakpoint.c:12365
 msgid "Deleted breakpoints "
 msgstr ""
 
@@ -3740,190 +3740,190 @@ msgstr ""
 #. Note that at this point, old_loc->owner is still
 #. valid, as delete_breakpoint frees the breakpoint
 #. only after calling us.
-#: breakpoint.c:12760
+#: breakpoint.c:12793
 #, possible-c-format
 msgid "warning: Error removing breakpoint %d\n"
 msgstr ""
 
-#: breakpoint.c:12868
+#: breakpoint.c:12901
 msgid "allegedly permanent breakpoint is not actually inserted"
 msgstr ""
 
-#: breakpoint.c:12910
+#: breakpoint.c:12943
 msgid "another breakpoint was inserted on top of a permanent breakpoint"
 msgstr ""
 
-#: breakpoint.c:13000
+#: breakpoint.c:13033
 #, possible-c-format
 msgid " (%s) pending."
 msgstr ""
 
-#: breakpoint.c:13356
+#: breakpoint.c:13389
 msgid "Temporary breakpoint"
 msgstr ""
 
-#: breakpoint.c:13358
+#: breakpoint.c:13391
 msgid "Breakpoint"
 msgstr ""
 
-#: breakpoint.c:13359 breakpoint.c:13697 breakpoint.c:13701 breakpoint.c:13705
+#: breakpoint.c:13392 breakpoint.c:13730 breakpoint.c:13734 breakpoint.c:13738
 #, possible-c-format
 msgid " %d"
 msgstr ""
 
-#: breakpoint.c:13361
+#: breakpoint.c:13394
 msgid " at gnu-indirect-function resolver"
 msgstr ""
 
-#: breakpoint.c:13364
+#: breakpoint.c:13397
 #, possible-c-format
 msgid "Hardware assisted breakpoint %d"
 msgstr ""
 
-#: breakpoint.c:13367
+#: breakpoint.c:13400
 #, possible-c-format
 msgid "Dprintf %d"
 msgstr ""
 
-#: breakpoint.c:13388
+#: breakpoint.c:13421
 #, possible-c-format
 msgid "unhandled breakpoint type %d"
 msgstr ""
 
 #. Not sure how we will get here.
 #. GDB should not stop for these breakpoints.
-#: breakpoint.c:13494
+#: breakpoint.c:13527
 msgid "Thread Event Breakpoint: gdb should not stop!\n"
 msgstr ""
 
 #. By analogy with the thread event, GDB should not stop for these.
-#: breakpoint.c:13499
+#: breakpoint.c:13532
 msgid "Overlay Event Breakpoint: gdb should not stop!\n"
 msgstr ""
 
 #. These should never be enabled.
-#: breakpoint.c:13504
+#: breakpoint.c:13537
 msgid "Longjmp Master Breakpoint: gdb should not stop!\n"
 msgstr ""
 
 #. These should never be enabled.
-#: breakpoint.c:13509
+#: breakpoint.c:13542
 msgid "std::terminate Master Breakpoint: gdb should not stop!\n"
 msgstr ""
 
 #. These should never be enabled.
-#: breakpoint.c:13515
+#: breakpoint.c:13548
 msgid "Exception Master Breakpoint: gdb should not stop!\n"
 msgstr ""
 
-#: breakpoint.c:13650
+#: breakpoint.c:13683
 msgid "probe not found"
 msgstr ""
 
-#: breakpoint.c:13696
+#: breakpoint.c:13729
 msgid "Tracepoint"
 msgstr ""
 
-#: breakpoint.c:13700
+#: breakpoint.c:13733
 msgid "Fast tracepoint"
 msgstr ""
 
-#: breakpoint.c:13704
+#: breakpoint.c:13737
 msgid "Static tracepoint"
 msgstr ""
 
-#: breakpoint.c:13709 breakpoint.c:13728
+#: breakpoint.c:13742 breakpoint.c:13761
 #, possible-c-format
 msgid "unhandled tracepoint type %d"
 msgstr ""
 
-#: breakpoint.c:13970
+#: breakpoint.c:14003
 #, possible-c-format
 msgid "marker %s not found"
 msgstr ""
 
-#: breakpoint.c:14164
+#: breakpoint.c:14197
 msgid "Delete all breakpoints? "
 msgstr ""
 
-#: breakpoint.c:14270
+#: breakpoint.c:14303
 #, possible-c-format
 msgid "static tracepoint %d changed probed marker from %s to %s"
 msgstr ""
 
-#: breakpoint.c:14305
+#: breakpoint.c:14338
 #, possible-c-format
 msgid "marker for static tracepoint %d (%s) not found at previous line number"
 msgstr ""
 
-#: breakpoint.c:14398
+#: breakpoint.c:14431
 #, possible-c-format
 msgid "Could not reset ranged breakpoint %d: multiple locations found\n"
 msgstr ""
 
-#: breakpoint.c:14439
+#: breakpoint.c:14472
 #, possible-c-format
 msgid "failed to reevaluate condition for breakpoint %d: %s"
 msgstr ""
 
-#: breakpoint.c:14786
+#: breakpoint.c:14819
 #, possible-c-format
 msgid "Ignore count ignored for tracepoint %d."
 msgstr ""
 
-#: breakpoint.c:14795
+#: breakpoint.c:14828
 #, possible-c-format
 msgid "Will stop next time breakpoint %d is reached."
 msgstr ""
 
-#: breakpoint.c:14799
+#: breakpoint.c:14832
 #, possible-c-format
 msgid "Will ignore next crossing of breakpoint %d."
 msgstr ""
 
-#: breakpoint.c:14802
+#: breakpoint.c:14835
 #, possible-c-format
 msgid "Will ignore next %d crossings of breakpoint %d."
 msgstr ""
 
-#: breakpoint.c:14822
+#: breakpoint.c:14855
 msgid "a breakpoint number"
 msgstr ""
 
-#: breakpoint.c:14826
+#: breakpoint.c:14859
 #, possible-c-format
 msgid "bad breakpoint number: '%s'"
 msgstr ""
 
-#: breakpoint.c:14828
+#: breakpoint.c:14861
 msgid "Second argument (specified ignore-count) is missing."
 msgstr ""
 
-#: breakpoint.c:14851
+#: breakpoint.c:14884
 msgid "one or more breakpoint numbers"
 msgstr ""
 
-#: breakpoint.c:14864
+#: breakpoint.c:14897
 #, possible-c-format
 msgid "bad breakpoint number at or near '%s'"
 msgstr ""
 
-#: breakpoint.c:14876
+#: breakpoint.c:14909
 #, possible-c-format
 msgid "No breakpoint number %d.\n"
 msgstr ""
 
-#: breakpoint.c:14896 breakpoint.c:14905
+#: breakpoint.c:14929 breakpoint.c:14938
 #, possible-c-format
 msgid "Bad breakpoint number '%s'"
 msgstr ""
 
-#: breakpoint.c:14910 breakpoint.c:14917
+#: breakpoint.c:14943 breakpoint.c:14950
 #, possible-c-format
 msgid "Bad breakpoint location number '%s'"
 msgstr ""
 
-#: breakpoint.c:15050
+#: breakpoint.c:15083
 #, possible-c-format
 msgid "Cannot enable watchpoint %d: "
 msgstr ""
@@ -3932,72 +3932,72 @@ msgstr ""
 #. address.  Since there is no way to confirm that the address
 #. means the same thing as when the trace was started, warn the
 #. user.
-#: breakpoint.c:15487
+#: breakpoint.c:15520
 #, possible-c-format
 msgid "Uploaded tracepoint %d has no source location, using raw address"
 msgstr ""
 
-#: breakpoint.c:15496
+#: breakpoint.c:15529
 #, possible-c-format
 msgid "Uploaded tracepoint %d condition has no source form, ignoring it"
 msgstr ""
 
-#: breakpoint.c:15544
+#: breakpoint.c:15577
 #, possible-c-format
 msgid "Uploaded tracepoint %d actions have no source form, ignoring them"
 msgstr ""
 
-#: breakpoint.c:15618
+#: breakpoint.c:15651
 msgid "Delete all tracepoints? "
 msgstr ""
 
-#: breakpoint.c:15637
+#: breakpoint.c:15670
 #, possible-c-format
 msgid "Setting tracepoint %d's passcount to %d\n"
 msgstr ""
 
-#: breakpoint.c:15654
+#: breakpoint.c:15687
 msgid "passcount command requires an argument (count + optional TP num)"
 msgstr ""
 
-#: breakpoint.c:15752
+#: breakpoint.c:15785
 #, possible-c-format
 msgid "bad tracepoint number at or near '%s'\n"
 msgstr ""
 
-#: breakpoint.c:15755
+#: breakpoint.c:15788
 msgid "No previous tracepoint\n"
 msgstr ""
 
-#: breakpoint.c:15797
+#: breakpoint.c:15830
 msgid "Argument required (file name in which to save)"
 msgstr ""
 
-#: breakpoint.c:15823
+#: breakpoint.c:15856
 msgid "Nothing to save."
 msgstr ""
 
-#: breakpoint.c:15831
+#: breakpoint.c:15864
 #, possible-c-format
 msgid "Unable to open file '%s' for saving (%s)"
 msgstr ""
 
-#: breakpoint.c:15900
+#: breakpoint.c:15933
 #, possible-c-format
 msgid "Saved to file '%s'.\n"
 msgstr ""
 
-#: breakpoint.c:16003
+#: breakpoint.c:16036
 msgid "\"save\" must be followed by the name of a save subcommand.\n"
 msgstr ""
 
-#: breakpoint.c:16301
+#: breakpoint.c:16334
 msgid ""
 "Set ignore-count of breakpoint number N to COUNT.\n"
 "Usage is `ignore N COUNT'."
 msgstr ""
 
-#: breakpoint.c:16307
+#: breakpoint.c:16340
 msgid ""
 "Set commands to be executed when a breakpoint is hit.\n"
 "Give breakpoint number as argument after \"commands\".\n"
@@ -4008,14 +4008,14 @@ msgid ""
 "then no output is printed when it is hit, except what the commands print."
 msgstr ""
 
-#: breakpoint.c:16316
+#: breakpoint.c:16349
 msgid ""
 "Specify breakpoint number N to break only if COND is true.\n"
 "Usage is `condition N COND', where N is an integer and COND is an\n"
 "expression to be evaluated whenever breakpoint N is reached."
 msgstr ""
 
-#: breakpoint.c:16322
+#: breakpoint.c:16355
 msgid ""
 "Set a temporary breakpoint.\n"
 "Like \"break\" except the breakpoint is only temporary,\n"
@@ -4024,7 +4024,7 @@ msgid ""
 "\n"
 msgstr ""
 
-#: breakpoint.c:16331
+#: breakpoint.c:16364
 msgid ""
 "Set a hardware assisted breakpoint.\n"
 "Like \"break\" except the breakpoint requires hardware support,\n"
@@ -4032,7 +4032,7 @@ msgid ""
 "\n"
 msgstr ""
 
-#: breakpoint.c:16339
+#: breakpoint.c:16372
 msgid ""
 "Set a temporary hardware assisted breakpoint.\n"
 "Like \"hbreak\" except the breakpoint is only temporary,\n"
@@ -4040,7 +4040,7 @@ msgid ""
 "\n"
 msgstr ""
 
-#: breakpoint.c:16347 breakpoint.c:16355
+#: breakpoint.c:16380 breakpoint.c:16388
 msgid ""
 "Enable some breakpoints.\n"
 "Give breakpoint numbers (separated by spaces) as arguments.\n"
@@ -4049,7 +4049,7 @@ msgid ""
 "With a subcommand you can enable temporarily."
 msgstr ""
 
-#: breakpoint.c:16364
+#: breakpoint.c:16397
 msgid ""
 "Enable some breakpoints.\n"
 "Give breakpoint numbers (separated by spaces) as arguments.\n"
@@ -4057,26 +4057,26 @@ msgid ""
 "May be abbreviated to simply \"enable\".\n"
 msgstr ""
 
-#: breakpoint.c:16371 breakpoint.c:16392
+#: breakpoint.c:16404 breakpoint.c:16425
 msgid ""
 "Enable breakpoints for one hit.  Give breakpoint numbers.\n"
 "If a breakpoint is hit while enabled in this fashion, it becomes disabled."
 msgstr ""
 
-#: breakpoint.c:16376 breakpoint.c:16387
+#: breakpoint.c:16409 breakpoint.c:16420
 msgid ""
 "Enable breakpoints and delete when hit.  Give breakpoint numbers.\n"
 "If a breakpoint is hit while enabled in this fashion, it is deleted."
 msgstr ""
 
-#: breakpoint.c:16381 breakpoint.c:16397
+#: breakpoint.c:16414 breakpoint.c:16430
 msgid ""
 "Enable breakpoints for COUNT hits.  Give count and then breakpoint numbers.\n"
 "If a breakpoint is hit while enabled in this fashion,\n"
 "the count is decremented; when it reaches zero, the breakpoint is disabled."
 msgstr ""
 
-#: breakpoint.c:16403 breakpoint.c:16412
+#: breakpoint.c:16436 breakpoint.c:16445
 msgid ""
 "Disable some breakpoints.\n"
 "Arguments are breakpoint numbers with spaces in between.\n"
@@ -4084,7 +4084,7 @@ msgid ""
 "A disabled breakpoint is not forgotten, but has no effect until re-enabled."
 msgstr ""
 
-#: breakpoint.c:16418
+#: breakpoint.c:16451
 msgid ""
 "Disable some breakpoints.\n"
 "Arguments are breakpoint numbers with spaces in between.\n"
@@ -4093,7 +4093,7 @@ msgid ""
 "This command may be abbreviated \"disable\"."
 msgstr ""
 
-#: breakpoint.c:16426
+#: breakpoint.c:16459
 msgid ""
 "Delete some breakpoints or auto-display expressions.\n"
 "Arguments are breakpoint numbers with spaces in between.\n"
@@ -4103,14 +4103,14 @@ msgid ""
 "The \"unset\" command is also an alias for \"delete\"."
 msgstr ""
 
-#: breakpoint.c:16437
+#: breakpoint.c:16470
 msgid ""
 "Delete some breakpoints.\n"
 "Arguments are breakpoint numbers with spaces in between.\n"
 "To delete all breakpoints, give no argument.\n"
 msgstr ""
 
-#: breakpoint.c:16442
+#: breakpoint.c:16475
 msgid ""
 "Delete some breakpoints or auto-display expressions.\n"
 "Arguments are breakpoint numbers with spaces in between.\n"
@@ -4118,7 +4118,7 @@ msgid ""
 "This command may be abbreviated \"delete\"."
 msgstr ""
 
-#: breakpoint.c:16449
+#: breakpoint.c:16482
 msgid ""
 "Clear breakpoint at specified line or function.\n"
 "Argument may be line number, function name, or \"*\" and an address.\n"
@@ -4133,23 +4133,23 @@ msgid ""
 "See also the \"delete\" command which clears breakpoints by number."
 msgstr ""
 
-#: breakpoint.c:16462
+#: breakpoint.c:16495
 msgid "Set breakpoint at specified line or function.\n"
 msgstr ""
 
-#: breakpoint.c:16477
+#: breakpoint.c:16510
 msgid "Break in function/address or break at a line in the current file."
 msgstr ""
 
-#: breakpoint.c:16481
+#: breakpoint.c:16514
 msgid "Break in function or address."
 msgstr ""
 
-#: breakpoint.c:16483
+#: breakpoint.c:16516
 msgid "Break at a line in the current file."
 msgstr ""
 
-#: breakpoint.c:16484 breakpoint.c:16520
+#: breakpoint.c:16517 breakpoint.c:16553
 msgid ""
 "Status of user-settable breakpoints, or breakpoint number NUMBER.\n"
 "The \"Type\" column indicates one of:\n"
@@ -4171,7 +4171,7 @@ msgid ""
 "breakpoint set."
 msgstr ""
 
-#: breakpoint.c:16501
+#: breakpoint.c:16534
 msgid ""
 "Status of specified breakpoints (all user-settable breakpoints if no "
 "argument).\n"
@@ -4194,7 +4194,7 @@ msgid ""
 "breakpoint set."
 msgstr ""
 
-#: breakpoint.c:16536
+#: breakpoint.c:16569
 msgid ""
 "Status of all breakpoints, or breakpoint number NUMBER.\n"
 "The \"Type\" column indicates one of:\n"
@@ -4220,43 +4220,43 @@ msgid ""
 "breakpoint set."
 msgstr ""
 
-#: breakpoint.c:16557
+#: breakpoint.c:16590
 msgid "Set catchpoints to catch events."
 msgstr ""
 
 #. allow-unknown
-#: breakpoint.c:16562
+#: breakpoint.c:16595
 msgid "Set temporary catchpoints to catch events."
 msgstr ""
 
 #. allow-unknown
-#: breakpoint.c:16567
+#: breakpoint.c:16600
 msgid "Catch calls to fork."
 msgstr ""
 
-#: breakpoint.c:16572
+#: breakpoint.c:16605
 msgid "Catch calls to vfork."
 msgstr ""
 
-#: breakpoint.c:16577
+#: breakpoint.c:16610
 msgid "Catch calls to exec."
 msgstr ""
 
-#: breakpoint.c:16582
+#: breakpoint.c:16615
 msgid ""
 "Catch loads of shared libraries.\n"
 "Usage: catch load [REGEX]\n"
 "If REGEX is given, only stop for libraries matching the regular expression."
 msgstr ""
 
-#: breakpoint.c:16589
+#: breakpoint.c:16622
 msgid ""
 "Catch unloads of shared libraries.\n"
 "Usage: catch unload [REGEX]\n"
 "If REGEX is given, only stop for libraries matching the regular expression."
 msgstr ""
 
-#: breakpoint.c:16596
+#: breakpoint.c:16629
 msgid ""
 "Catch system calls by their names and/or numbers.\n"
 "Arguments say which system calls to catch.  If no arguments\n"
@@ -4265,7 +4265,7 @@ msgid ""
 "(if your system supports that), or system call numbers."
 msgstr ""
 
-#: breakpoint.c:16607
+#: breakpoint.c:16640
 msgid ""
 "Set a watchpoint for an expression.\n"
 "Usage: watch [-l|-location] EXPRESSION\n"
@@ -4275,7 +4275,7 @@ msgid ""
 "the memory to which it refers."
 msgstr ""
 
-#: breakpoint.c:16616
+#: breakpoint.c:16649
 msgid ""
 "Set a read watchpoint for an expression.\n"
 "Usage: rwatch [-l|-location] EXPRESSION\n"
@@ -4285,7 +4285,7 @@ msgid ""
 "the memory to which it refers."
 msgstr ""
 
-#: breakpoint.c:16625
+#: breakpoint.c:16658
 msgid ""
 "Set a watchpoint for an expression.\n"
 "Usage: awatch [-l|-location] EXPRESSION\n"
@@ -4295,19 +4295,19 @@ msgid ""
 "the memory to which it refers."
 msgstr ""
 
-#: breakpoint.c:16634
+#: breakpoint.c:16667
 msgid "Status of specified watchpoints (all watchpoints if no argument)."
 msgstr ""
 
-#: breakpoint.c:16640
+#: breakpoint.c:16673
 msgid "Set debugger's willingness to use watchpoint hardware."
 msgstr ""
 
-#: breakpoint.c:16641
+#: breakpoint.c:16674
 msgid "Show debugger's willingness to use watchpoint hardware."
 msgstr ""
 
-#: breakpoint.c:16642
+#: breakpoint.c:16675
 msgid ""
 "If zero, gdb will not use hardware for new watchpoints, even if\n"
 "such is available.  (However, any hardware watchpoints that were\n"
@@ -4316,19 +4316,19 @@ msgid ""
 msgstr ""
 
 #. Tracepoint manipulation commands.
-#: breakpoint.c:16655
+#: breakpoint.c:16688
 msgid ""
 "Set a tracepoint at specified line or function.\n"
 "\n"
 msgstr ""
 
-#: breakpoint.c:16667
+#: breakpoint.c:16700
 msgid ""
 "Set a fast tracepoint at specified line or function.\n"
 "\n"
 msgstr ""
 
-#: breakpoint.c:16674
+#: breakpoint.c:16707
 msgid ""
 "Set a static tracepoint at specified line, function or marker.\n"
 "\n"
@@ -4356,35 +4356,35 @@ msgid ""
 "Do \"help tracepoints\" for info on other tracepoint commands."
 msgstr ""
 
-#: breakpoint.c:16700
+#: breakpoint.c:16733
 msgid ""
 "Status of specified tracepoints (all tracepoints if no argument).\n"
 "Convenience variable \"$tpnum\" contains the number of the\n"
 "last tracepoint set."
 msgstr ""
 
-#: breakpoint.c:16707
+#: breakpoint.c:16740
 msgid ""
 "Delete specified tracepoints.\n"
 "Arguments are tracepoint numbers, separated by spaces.\n"
 "No argument means delete all tracepoints."
 msgstr ""
 
-#: breakpoint.c:16714
+#: breakpoint.c:16747
 msgid ""
 "Disable specified tracepoints.\n"
 "Arguments are tracepoint numbers, separated by spaces.\n"
 "No argument means disable all tracepoints."
 msgstr ""
 
-#: breakpoint.c:16721
+#: breakpoint.c:16754
 msgid ""
 "Enable specified tracepoints.\n"
 "Arguments are tracepoint numbers, separated by spaces.\n"
 "No argument means enable all tracepoints."
 msgstr ""
 
-#: breakpoint.c:16728
+#: breakpoint.c:16761
 msgid ""
 "Set the passcount for a tracepoint.\n"
 "The trace will end when the tracepoint has been passed 'count' times.\n"
@@ -4392,12 +4392,12 @@ msgid ""
 "if TPNUM is omitted, passcount refers to the last tracepoint defined."
 msgstr ""
 
-#: breakpoint.c:16735
+#: breakpoint.c:16768
 msgid "Save breakpoint definitions as a script."
 msgstr ""
 
 #. allow-unknown
-#: breakpoint.c:16739
+#: breakpoint.c:16772
 msgid ""
 "Save current breakpoint definitions as a script.\n"
 "This includes all types of breakpoints (breakpoints, watchpoints,\n"
@@ -4405,29 +4405,29 @@ msgid ""
 "session to restore them."
 msgstr ""
 
-#: breakpoint.c:16747
+#: breakpoint.c:16780
 msgid ""
 "Save current tracepoint definitions as a script.\n"
 "Use the 'source' command in another debug session to restore them."
 msgstr ""
 
 #. allow-unknown
-#: breakpoint.c:16756 breakpoint.c:16762
+#: breakpoint.c:16789 breakpoint.c:16795
 msgid ""
 "Breakpoint specific settings\n"
 "Configure various breakpoint-specific variables such as\n"
 "pending breakpoint behavior"
 msgstr ""
 
-#: breakpoint.c:16770
+#: breakpoint.c:16803
 msgid "Set debugger's behavior regarding pending breakpoints."
 msgstr ""
 
-#: breakpoint.c:16771
+#: breakpoint.c:16804
 msgid "Show debugger's behavior regarding pending breakpoints."
 msgstr ""
 
-#: breakpoint.c:16772
+#: breakpoint.c:16805
 msgid ""
 "If on, an unrecognized breakpoint location will cause gdb to create a\n"
 "pending breakpoint.  If off, an unrecognized breakpoint location results in\n"
@@ -4435,15 +4435,15 @@ msgid ""
 "user-query to see if a pending breakpoint should be created."
 msgstr ""
 
-#: breakpoint.c:16785
+#: breakpoint.c:16818
 msgid "Set automatic usage of hardware breakpoints."
 msgstr ""
 
-#: breakpoint.c:16786
+#: breakpoint.c:16819
 msgid "Show automatic usage of hardware breakpoints."
 msgstr ""
 
-#: breakpoint.c:16787
+#: breakpoint.c:16820
 msgid ""
 "If set, the debugger will automatically use hardware breakpoints for\n"
 "breakpoints set with \"break\" but falling in read-only memory.  If not "
@@ -4451,15 +4451,15 @@ msgid ""
 "a warning will be emitted for such breakpoints."
 msgstr ""
 
-#: breakpoint.c:16797
+#: breakpoint.c:16830
 msgid "Set mode for inserting breakpoints."
 msgstr ""
 
-#: breakpoint.c:16798
+#: breakpoint.c:16831
 msgid "Show mode for inserting breakpoints."
 msgstr ""
 
-#: breakpoint.c:16799
+#: breakpoint.c:16832
 msgid ""
 "When this mode is on, breakpoints are inserted immediately as soon as\n"
 "they're created, kept inserted even when execution stops, and removed\n"
@@ -4468,15 +4468,15 @@ msgid ""
 "when execution stops."
 msgstr ""
 
-#: breakpoint.c:16812
+#: breakpoint.c:16845
 msgid "Set mode of breakpoint condition evaluation."
 msgstr ""
 
-#: breakpoint.c:16813
+#: breakpoint.c:16846
 msgid "Show mode of breakpoint condition evaluation."
 msgstr ""
 
-#: breakpoint.c:16814
+#: breakpoint.c:16847
 msgid ""
 "When this is set to \"host\", breakpoint conditions will be\n"
 "evaluated on the host's side by GDB.  When it is set to \"target\",\n"
@@ -4488,7 +4488,7 @@ msgid ""
 "be set to \"gdb\""
 msgstr ""
 
-#: breakpoint.c:16827
+#: breakpoint.c:16860
 msgid ""
 "Set a breakpoint for an address range.\n"
 "break-range START-LOCATION, END-LOCATION\n"
@@ -4506,7 +4506,7 @@ msgid ""
 "range (including START-LOCATION and END-LOCATION)."
 msgstr ""
 
-#: breakpoint.c:16843
+#: breakpoint.c:16876
 msgid ""
 "Set a dynamic printf at specified line or function.\n"
 "dprintf location,format string,arg1,arg2,...\n"
@@ -4515,15 +4515,15 @@ msgid ""
 "If a function is specified, break at start of code for that function."
 msgstr ""
 
-#: breakpoint.c:16852
+#: breakpoint.c:16885
 msgid "Set the style of usage for dynamic printf."
 msgstr ""
 
-#: breakpoint.c:16853
+#: breakpoint.c:16886
 msgid "Show the style of usage for dynamic printf."
 msgstr ""
 
-#: breakpoint.c:16854
+#: breakpoint.c:16887
 msgid ""
 "This setting chooses how GDB will do a dynamic printf.\n"
 "If the value is \"gdb\", then the printing is done by GDB to its own\n"
@@ -4533,37 +4533,37 @@ msgid ""
 "output stream by setting dprintf-function and dprintf-channel."
 msgstr ""
 
-#: breakpoint.c:16866
+#: breakpoint.c:16899
 msgid "Set the function to use for dynamic printf"
 msgstr ""
 
-#: breakpoint.c:16867
+#: breakpoint.c:16900
 msgid "Show the function to use for dynamic printf"
 msgstr ""
 
-#: breakpoint.c:16874
+#: breakpoint.c:16907
 msgid "Set the channel to use for dynamic printf"
 msgstr ""
 
-#: breakpoint.c:16875
+#: breakpoint.c:16908
 msgid "Show the channel to use for dynamic printf"
 msgstr ""
 
-#: breakpoint.c:16881
+#: breakpoint.c:16914
 msgid "Set whether dprintf continues after GDB disconnects."
 msgstr ""
 
-#: breakpoint.c:16882
+#: breakpoint.c:16915
 msgid "Show whether dprintf continues after GDB disconnects."
 msgstr ""
 
-#: breakpoint.c:16883
+#: breakpoint.c:16916
 msgid ""
 "Use this to let dprintf commands continue to hit and produce output\n"
 "even if GDB disconnects or detaches from the target."
 msgstr ""
 
-#: breakpoint.c:16890
+#: breakpoint.c:16923
 msgid ""
 "agent-printf \"printf format string\", arg1, arg2, arg3, ..., argn\n"
 "(target agent only) This is useful for formatted output in user-defined "
@@ -4713,7 +4713,7 @@ msgstr ""
 #: exec.c:693 language.c:534 mdebugread.c:3668 monitor.c:325 monitor.c:355
 #: monitor.c:1322 printcmd.c:483 printcmd.c:838 printcmd.c:2439 psymtab.c:704
 #: psymtab.c:722 remote-mips.c:2719 target.c:679 target.c:763 target.c:790
-#: utils.c:1958 valprint.c:1040
+#: utils.c:1925 valprint.c:1040
 msgid "failed internal consistency check"
 msgstr ""
 
@@ -6398,75 +6398,80 @@ msgstr ""
 msgid "Unsupported size %d in %s"
 msgstr ""
 
-#: compile/compile.c:61
+#: compile/compile.c:62
 #, possible-c-format
 msgid "Compile debugging is %s.\n"
 msgstr ""
 
-#: compile/compile.c:97
+#: compile/compile.c:98
 msgid "You must provide a filename for this command."
 msgstr ""
 
-#: compile/compile.c:109
+#: compile/compile.c:110
 msgid "You must provide a filename with the raw option set."
 msgstr ""
 
-#: compile/compile.c:112 compile/compile.c:148
+#: compile/compile.c:113 compile/compile.c:149
 msgid "Unknown argument specified."
 msgstr ""
 
-#: compile/compile.c:197
+#: compile/compile.c:179
+#, possible-c-format
+msgid "Could not remove temporary directory %s"
+msgstr ""
+
+#: compile/compile.c:202
 msgid "Command not supported on this host."
 msgstr ""
 
-#: compile/compile.c:200
+#: compile/compile.c:205
 msgid "Could not make temporary directory"
 msgstr ""
 
-#: compile/compile.c:277
+#: compile/compile.c:282
 #, possible-c-format
 msgid "Compile command command-line arguments are \"%s\".\n"
 msgstr ""
 
-#: compile/compile.c:412
+#: compile/compile.c:417
 msgid "The program must be running for the compile command to work."
 msgstr ""
 
-#: compile/compile.c:420
+#: compile/compile.c:425
 msgid "No compiler support for this language."
 msgstr ""
 
-#: compile/compile.c:449
+#: compile/compile.c:454
 msgid "Neither a simple expression, or a multi-line specified."
 msgstr ""
 
-#: compile/compile.c:490
+#: compile/compile.c:495
 msgid "Could not open source file for writing"
 msgstr ""
 
-#: compile/compile.c:493
+#: compile/compile.c:498
 msgid "Could not write to source file"
 msgstr ""
 
-#: compile/compile.c:505
+#: compile/compile.c:510
 msgid "Compilation failed."
 msgstr ""
 
-#: compile/compile.c:571
+#: compile/compile.c:576
 #, possible-c-format
 msgid "Invalid register name \"%s\"."
 msgstr ""
 
-#: compile/compile.c:578
+#: compile/compile.c:583
 #, possible-c-format
 msgid "Cannot find gdbarch register \"%s\"."
 msgstr ""
 
-#: compile/compile.c:589
+#: compile/compile.c:594
 msgid "Command to compile source code and inject it into the inferior."
 msgstr ""
 
-#: compile/compile.c:595
+#: compile/compile.c:600
 msgid ""
 "Compile, inject, and execute code.\n"
 "\n"
@@ -6487,7 +6492,7 @@ msgid ""
 "the end of the source code."
 msgstr ""
 
-#: compile/compile.c:616
+#: compile/compile.c:621
 msgid ""
 "Evaluate a file containing source code.\n"
 "\n"
@@ -6495,27 +6500,27 @@ msgid ""
 "-r|-raw: Suppress automatic 'void _gdb_expr () { CODE }' wrapping."
 msgstr ""
 
-#: compile/compile.c:624
+#: compile/compile.c:629
 msgid "Set compile command debugging."
 msgstr ""
 
-#: compile/compile.c:625
+#: compile/compile.c:630
 msgid "Show compile command debugging."
 msgstr ""
 
-#: compile/compile.c:626
+#: compile/compile.c:631
 msgid "When on, compile command debugging is enabled."
 msgstr ""
 
-#: compile/compile.c:633
+#: compile/compile.c:638
 msgid "Set compile command GCC command-line arguments"
 msgstr ""
 
-#: compile/compile.c:634
+#: compile/compile.c:639
 msgid "Show compile command GCC command-line arguments"
 msgstr ""
 
-#: compile/compile.c:635
+#: compile/compile.c:640
 msgid ""
 "Use options like -I (include file directory) or ABI settings.\n"
 "String quoting is parsed like in shell, for example:\n"
@@ -11085,12 +11090,17 @@ msgstr ""
 msgid "Can't debug x86-64 process with 32-bit GDBserver"
 msgstr ""
 
-#: gdbserver/thread-db.c:753
+#: gdbserver/thread-db.c:764
 #, possible-c-format
 msgid "libthread-db-search-path component too long, ignored: %s."
 msgstr ""
 
-#: gdbserver/linux-low.c:1136 linux-nat.c:1357
+#: gdbserver/linux-low.c:807
+#, possible-c-format
+msgid "Cannot attach to lwp %d: %s"
+msgstr ""
+
+#: gdbserver/linux-low.c:1152 linux-nat.c:1441
 #, possible-c-format
 msgid "Can't detach %s: %s"
 msgstr ""
@@ -14734,7 +14744,7 @@ msgstr ""
 msgid "TT_PROC_GET_NEXT_LWP_STATE ttrace call failed"
 msgstr ""
 
-#: inf-ttrace.c:973 linux-nat.c:895 procfs.c:3637 procfs.c:3775
+#: inf-ttrace.c:973 linux-nat.c:901 procfs.c:3637 procfs.c:3775
 #, possible-c-format
 msgid "[%s exited]\n"
 msgstr ""
@@ -15359,15 +15369,15 @@ msgstr ""
 msgid "Debugging of GNU/Linux lwp module is %s.\n"
 msgstr ""
 
-#: linux-nat.c:425
+#: linux-nat.c:431
 msgid "Couldn't do single step"
 msgstr ""
 
-#: linux-nat.c:427
+#: linux-nat.c:433
 msgid "Couldn't wait vfork process"
 msgstr ""
 
-#: linux-nat.c:946
+#: linux-nat.c:952
 #, possible-c-format
 msgid "%s is a cloned process"
 msgstr ""
@@ -15377,78 +15387,83 @@ msgstr ""
 #. creation is interrupted; as of Linux kernel 2.6.19, a
 #. bug may place threads in the thread list and then fail
 #. to create them.
-#: linux-nat.c:1043
+#: linux-nat.c:1050
 #, possible-c-format
 msgid "Can't attach %s: %s"
 msgstr ""
 
-#: linux-nat.c:1118
+#: linux-nat.c:1125
 #, possible-c-format
 msgid "Error disabling address space randomization: %s"
 msgstr ""
 
-#: linux-nat.c:1134
+#: linux-nat.c:1141
 #, possible-c-format
 msgid "Error restoring address space randomization: %s"
 msgstr ""
 
-#: linux-nat.c:1198
+#: linux-nat.c:1184
+#, possible-c-format
+msgid "Cannot attach to lwp %d: %s\n"
+msgstr ""
+
+#: linux-nat.c:1272
 msgid "Unable to attach: program exited normally."
 msgstr ""
 
-#: linux-nat.c:1200
+#: linux-nat.c:1274
 #, possible-c-format
 msgid "Unable to attach: program exited with code %d."
 msgstr ""
 
-#: linux-nat.c:1211
+#: linux-nat.c:1285
 #, possible-c-format
 msgid "Unable to attach: program terminated with signal %s, %s."
 msgstr ""
 
-#: linux-nat.c:1218
+#: linux-nat.c:1292
 #, possible-c-format
 msgid "unexpected status %d for PID %ld"
 msgstr ""
 
-#: linux-nat.c:1827
+#: linux-nat.c:1920
 msgid "waiting for new child"
 msgstr ""
 
-#: linux-nat.c:1830
+#: linux-nat.c:1923
 #, possible-c-format
 msgid "wait returned unexpected PID %d"
 msgstr ""
 
-#: linux-nat.c:1833
+#: linux-nat.c:1926
 #, possible-c-format
 msgid "wait returned unexpected status 0x%x"
 msgstr ""
 
-#: linux-nat.c:2048
+#: linux-nat.c:2136
 #, possible-c-format
 msgid "unknown ptrace event %d"
 msgstr ""
 
-#: linux-nat.c:4063 linux-nat.c:4076
+#: linux-nat.c:4087 linux-nat.c:4100
 #, possible-c-format
 msgid "Could not parse signal set: %s"
 msgstr ""
 
-#: linux-nat.c:4110
+#: linux-nat.c:4134
 #, possible-c-format
 msgid "Could not open %s"
 msgstr ""
 
-#: linux-nat.c:4781
+#: linux-nat.c:4805
 msgid "Set debugging of GNU/Linux lwp module."
 msgstr ""
 
-#: linux-nat.c:4782
+#: linux-nat.c:4806
 msgid "Show debugging of GNU/Linux lwp module."
 msgstr ""
 
-#: linux-nat.c:4783
+#: linux-nat.c:4807
 msgid "Enables printf debugging output."
 msgstr ""
 
@@ -15525,7 +15540,7 @@ msgid "process %ld\n"
 msgstr ""
 
 #: linux-tdep.c:436 linux-tdep.c:523 linux-tdep.c:536 linux-tdep.c:673
-#: nat/linux-procfs.c:38 nat/linux-procfs.c:84
+#: nat/linux-procfs.c:40 nat/linux-procfs.c:89
 #, possible-c-format
 msgid "unable to open /proc file '%s'"
 msgstr ""
@@ -15759,221 +15774,221 @@ msgstr ""
 msgid "Failed inferior mmap call for %s bytes, errno is changed."
 msgstr ""
 
-#: linux-thread-db.c:86
+#: linux-thread-db.c:97
 #, possible-c-format
 msgid "Auto-loading of inferior specific libthread_db is %s.\n"
 msgstr ""
 
-#: linux-thread-db.c:110
+#: linux-thread-db.c:121
 #, possible-c-format
 msgid "libthread-db debugging is %s.\n"
 msgstr ""
 
-#: linux-thread-db.c:420
+#: linux-thread-db.c:431
 #, possible-c-format
 msgid "thread_get_info_callback: cannot get thread info: %s"
 msgstr ""
 
-#: linux-thread-db.c:465
+#: linux-thread-db.c:476
 #, possible-c-format
 msgid "Cannot find user-level thread for LWP %ld: %s"
 msgstr ""
 
-#: linux-thread-db.c:513 linux-thread-db.c:1480
+#: linux-thread-db.c:524 linux-thread-db.c:1510
 #, possible-c-format
 msgid "Cannot get thread info: %s"
 msgstr ""
 
-#: linux-thread-db.c:526
+#: linux-thread-db.c:537
 #, possible-c-format
 msgid "Symbol \"%s\" not found in libthread_db: %s"
 msgstr ""
 
-#: linux-thread-db.c:626
+#: linux-thread-db.c:637
 #, possible-c-format
 msgid "Unable to set global thread event mask: %s"
 msgstr ""
 
-#: linux-thread-db.c:640
+#: linux-thread-db.c:651
 #, possible-c-format
 msgid "Unable to get location for thread creation breakpoint: %s"
 msgstr ""
 
-#: linux-thread-db.c:649
+#: linux-thread-db.c:660
 #, possible-c-format
 msgid "Unable to get location for thread death breakpoint: %s"
 msgstr ""
 
-#: linux-thread-db.c:696
+#: linux-thread-db.c:707
 msgid "Warning: couldn't activate thread debugging using libthread_db: "
 msgstr ""
 
-#: linux-thread-db.c:739
+#: linux-thread-db.c:750
 #, possible-c-format
 msgid "Cannot initialize libthread_db: %s"
 msgstr ""
 
-#: linux-thread-db.c:756
+#: linux-thread-db.c:767
 #, possible-c-format
 msgid "td_ta_new failed: %s\n"
 msgstr ""
 
-#: linux-thread-db.c:770
+#: linux-thread-db.c:781
 #, possible-c-format
 msgid "td_ta_new failed: %s"
 msgstr ""
 
-#: linux-thread-db.c:813 sol-thread.c:616
+#: linux-thread-db.c:824 sol-thread.c:616
 msgid "[Thread debugging using libthread_db enabled]\n"
 msgstr ""
 
-#: linux-thread-db.c:823
+#: linux-thread-db.c:840
 #, possible-c-format
 msgid "Using host libthread_db library \"%s\".\n"
 msgstr ""
 
-#: linux-thread-db.c:849
+#: linux-thread-db.c:867
 #, possible-c-format
 msgid "Trying host libthread_db library: %s.\n"
 msgstr ""
 
-#: linux-thread-db.c:859
+#: linux-thread-db.c:877
 #, possible-c-format
 msgid "open failed: %s.\n"
 msgstr ""
 
-#: linux-thread-db.c:863
+#: linux-thread-db.c:882
 #, possible-c-format
 msgid ""
 "auto-load: Loading libthread-db library \"%s\" from explicit directory.\n"
 msgstr ""
 
-#: linux-thread-db.c:874
+#: linux-thread-db.c:893
 #, possible-c-format
 msgid "dlopen failed: %s.\n"
 msgstr ""
 
-#: linux-thread-db.c:888
+#: linux-thread-db.c:907
 #, possible-c-format
 msgid "Host %s resolved to: %s.\n"
 msgstr ""
 
-#: linux-thread-db.c:922
+#: linux-thread-db.c:941
 #, possible-c-format
 msgid "Expected absolute pathname for libpthread in the inferior, but got %s."
 msgstr ""
 
-#: linux-thread-db.c:1079
+#: linux-thread-db.c:1099
 #, possible-c-format
 msgid "thread_db_load_search returning %d\n"
 msgstr ""
 
-#: linux-thread-db.c:1126
+#: linux-thread-db.c:1146
 msgid ""
 "Unable to find libthread_db matching inferior's thread library, thread "
 "debugging will not be available."
 msgstr ""
 
-#: linux-thread-db.c:1238
+#: linux-thread-db.c:1258
 msgid ""
 "Target and debugger are in different PID namespaces; thread lists and other "
 "data are likely unreliable"
 msgstr ""
 
-#: linux-thread-db.c:1356
+#: linux-thread-db.c:1386
 #, possible-c-format
 msgid "Cannot enable thread event reporting for %s: %s"
 msgstr ""
 
-#: linux-thread-db.c:1474
+#: linux-thread-db.c:1504
 #, possible-c-format
 msgid "Cannot get thread event message: %s"
 msgstr ""
 
-#: linux-thread-db.c:1496
+#: linux-thread-db.c:1526
 msgid "Spurious thread death event."
 msgstr ""
 
-#: linux-thread-db.c:1503
+#: linux-thread-db.c:1533
 msgid "Spurious thread event."
 msgstr ""
 
-#: linux-thread-db.c:1601
+#: linux-thread-db.c:1631
 #, possible-c-format
 msgid "find_new_threads_callback: cannot get thread info: %s"
 msgstr ""
 
-#: linux-thread-db.c:1620
+#: linux-thread-db.c:1661
 #, possible-c-format
 msgid "Cannot enable thread event reporting for LWP %d: %s"
 msgstr ""
 
-#: linux-thread-db.c:1689
+#: linux-thread-db.c:1737
 #, possible-c-format
 msgid "Found %d new threads in iteration %d.\n"
 msgstr ""
 
-#: linux-thread-db.c:1732
+#: linux-thread-db.c:1780
 #, possible-c-format
 msgid "Cannot find new threads: %s"
 msgstr ""
 
-#: linux-thread-db.c:1850
+#: linux-thread-db.c:1898
 msgid "No TLS library support"
 msgstr ""
 
-#: linux-thread-db.c:1865
+#: linux-thread-db.c:1913
 msgid "TLS load module not found"
 msgstr ""
 
-#: linux-thread-db.c:1885
+#: linux-thread-db.c:1933
 msgid "TLS not allocated yet"
 msgstr ""
 
-#: linux-thread-db.c:1989
+#: linux-thread-db.c:2037
 msgid "'info auto-load libthread-db' does not accept any parameters"
 msgstr ""
 
-#: linux-thread-db.c:2095
+#: linux-thread-db.c:2143
 msgid "No auto-loaded libthread-db.\n"
 msgstr ""
 
-#: linux-thread-db.c:2140
+#: linux-thread-db.c:2188
 msgid "Set search path for libthread_db."
 msgstr ""
 
-#: linux-thread-db.c:2141
+#: linux-thread-db.c:2189
 msgid "Show the current search path or libthread_db."
 msgstr ""
 
-#: linux-thread-db.c:2142
+#: linux-thread-db.c:2190
 msgid ""
 "This path is used to search for libthread_db to be loaded into gdb itself.\n"
 "Its value is a colon (':') separate list of directories to search.\n"
 "Setting the search path to an empty list resets it to its default value."
 msgstr ""
 
-#: linux-thread-db.c:2152
+#: linux-thread-db.c:2200
 msgid "Set libthread-db debugging."
 msgstr ""
 
-#: linux-thread-db.c:2153
+#: linux-thread-db.c:2201
 msgid "Show libthread-db debugging."
 msgstr ""
 
-#: linux-thread-db.c:2154
+#: linux-thread-db.c:2202
 msgid "When non-zero, libthread-db debugging is enabled."
 msgstr ""
 
-#: linux-thread-db.c:2161
+#: linux-thread-db.c:2209
 msgid "Enable or disable auto-loading of inferior specific libthread_db."
 msgstr ""
 
-#: linux-thread-db.c:2162
+#: linux-thread-db.c:2210
 msgid "Show whether auto-loading inferior specific libthread_db is enabled."
 msgstr ""
 
-#: linux-thread-db.c:2163
+#: linux-thread-db.c:2211
 msgid ""
 "If enabled, libthread_db will be searched in 'set libthread-db-search-path'\n"
 "locations to load libthread_db compatible with the inferior.\n"
@@ -15981,7 +15996,7 @@ msgid ""
 "This options has security implications for untrusted inferiors."
 msgstr ""
 
-#: linux-thread-db.c:2173
+#: linux-thread-db.c:2221
 msgid ""
 "Print the list of loaded inferior specific libthread_db.\n"
 "Usage: info auto-load libthread-db"
@@ -18649,99 +18664,99 @@ msgstr ""
 msgid "process %d is a zombie - the process has already terminated"
 msgstr ""
 
-#: nat/linux-ptrace.c:87
+#: nat/linux-ptrace.c:113
 #, possible-c-format
 msgid "linux_ptrace_test_ret_to_nx: Cannot mmap: %s"
 msgstr ""
 
-#: nat/linux-ptrace.c:99
+#: nat/linux-ptrace.c:125
 #, possible-c-format
 msgid "linux_ptrace_test_ret_to_nx: Cannot fork: %s"
 msgstr ""
 
-#: nat/linux-ptrace.c:107
+#: nat/linux-ptrace.c:133
 #, possible-c-format
 msgid "linux_ptrace_test_ret_to_nx: Cannot PTRACE_TRACEME: %s"
 msgstr ""
 
-#: nat/linux-ptrace.c:137
+#: nat/linux-ptrace.c:163
 #, possible-c-format
 msgid "linux_ptrace_test_ret_to_nx: waitpid returned %ld: %s"
 msgstr ""
 
-#: nat/linux-ptrace.c:145
+#: nat/linux-ptrace.c:171
 #, possible-c-format
 msgid "linux_ptrace_test_ret_to_nx: WTERMSIG %d is not SIGKILL!"
 msgstr ""
 
-#: nat/linux-ptrace.c:148
+#: nat/linux-ptrace.c:174
 msgid ""
 "Cannot call inferior functions, Linux kernel PaX protection forbids return "
 "to non-executable pages!"
 msgstr ""
 
-#: nat/linux-ptrace.c:155
+#: nat/linux-ptrace.c:181
 #, possible-c-format
 msgid "linux_ptrace_test_ret_to_nx: status %d is not WIFSTOPPED!"
 msgstr ""
 
-#: nat/linux-ptrace.c:163
+#: nat/linux-ptrace.c:189
 #, possible-c-format
 msgid ""
 "linux_ptrace_test_ret_to_nx: WSTOPSIG %d is neither SIGTRAP nor SIGSEGV!"
 msgstr ""
 
-#: nat/linux-ptrace.c:181
+#: nat/linux-ptrace.c:207
 #, possible-c-format
 msgid "linux_ptrace_test_ret_to_nx: Cannot PTRACE_PEEKUSER: %s"
 msgstr ""
 
-#: nat/linux-ptrace.c:195
+#: nat/linux-ptrace.c:221
 #, possible-c-format
 msgid "linux_ptrace_test_ret_to_nx: PTRACE_KILL waitpid returned %ld: %s"
 msgstr ""
 
-#: nat/linux-ptrace.c:202
+#: nat/linux-ptrace.c:228
 #, possible-c-format
 msgid "linux_ptrace_test_ret_to_nx: PTRACE_KILL status %d is not WIFSIGNALED!"
 msgstr ""
 
-#: nat/linux-ptrace.c:223
+#: nat/linux-ptrace.c:249
 #, possible-c-format
 msgid ""
 "linux_ptrace_test_ret_to_nx: PC %p is neither near return address %p nor is "
 "the return instruction %p!"
 msgstr ""
 
-#: nat/linux-ptrace.c:227
+#: nat/linux-ptrace.c:253
 msgid ""
 "Cannot call inferior functions on this system - Linux kernel with broken "
 "i386 NX (non-executable pages) support detected!"
 msgstr ""
 
-#: nat/linux-ptrace.c:332
+#: nat/linux-ptrace.c:358
 #, possible-c-format
 msgid "linux_check_ptrace_features: waitpid: unexpected result %d."
 msgstr ""
 
-#: nat/linux-ptrace.c:335
+#: nat/linux-ptrace.c:361
 #, possible-c-format
 msgid "linux_check_ptrace_features: waitpid: unexpected status %d."
 msgstr ""
 
-#: nat/linux-ptrace.c:350
+#: nat/linux-ptrace.c:376
 msgid "linux_check_ptrace_features: failed to kill child"
 msgstr ""
 
-#: nat/linux-ptrace.c:416
+#: nat/linux-ptrace.c:442
 msgid "linux_test_for_tracefork: failed to resume child"
 msgstr ""
 
-#: nat/linux-ptrace.c:445
+#: nat/linux-ptrace.c:471
 msgid "linux_test_for_tracefork: failed to kill second child"
 msgstr ""
 
-#: nat/linux-ptrace.c:451
+#: nat/linux-ptrace.c:477
 #, possible-c-format
 msgid ""
 "linux_test_for_tracefork: unexpected result from waitpid (%d, status 0x%x)"
@@ -18788,6 +18803,11 @@ msgstr ""
 msgid "test branch tracing: expected killed. status: %d."
 msgstr ""
 
+#: nat/linux-procfs.c:215
+#, possible-c-format
+msgid "Could not open /proc/%ld/task.\n"
+msgstr ""
+
 #: nat/x86-dregs.c:232
 msgid "The i386 doesn't support data-read watchpoints.\n"
 msgstr ""
@@ -27819,14 +27839,6 @@ msgstr ""
 msgid "Show the notes string to use for future tstop commands"
 msgstr ""
 
-#: tui/tui-hooks.c:87
-msgid "(y or n) "
-msgstr ""
-
-#: tui/tui-hooks.c:120
-msgid "Please answer y or n.\n"
-msgstr ""
-
 #: tui/tui.c:420
 #, possible-c-format
 msgid "Cannot enable the TUI when the interpreter is '%s'"
@@ -27853,11 +27865,11 @@ msgid ""
 "point.\n"
 msgstr ""
 
-#: tui/tui-io.c:619
+#: tui/tui-io.c:622
 msgid "Cannot create pipe for readline"
 msgstr ""
 
-#: tui/tui-io.c:623
+#: tui/tui-io.c:626
 msgid "Cannot redirect readline output"
 msgstr ""
 
@@ -28447,23 +28459,23 @@ msgstr ""
 msgid "virtual memory exhausted."
 msgstr ""
 
-#: utils.c:1251
+#: utils.c:1250
 #, possible-c-format
 msgid "(%s or %s) [answered %c; input not from terminal]\n"
 msgstr ""
 
-#: utils.c:1279
+#: utils.c:1265
 #, possible-c-format
-msgid "(%s or %s) "
+msgid "%s%s(%s or %s) %s"
 msgstr ""
 
 #. Invalid entries are not defaulted and require another selection.
-#: utils.c:1343
+#: utils.c:1310
 #, possible-c-format
 msgid "Please answer %s or %s.\n"
 msgstr ""
 
-#: utils.c:1527
+#: utils.c:1494
 #, possible-c-format
 msgid ""
 "The escape sequence `\\%c' is equivalent to plain `%c', which has no "
@@ -28471,109 +28483,109 @@ msgid ""
 "in the `%s' character set."
 msgstr ""
 
-#: utils.c:1638
+#: utils.c:1605
 #, possible-c-format
 msgid "Number of lines gdb thinks are in a page is %s.\n"
 msgstr ""
 
-#: utils.c:1649
+#: utils.c:1616
 #, possible-c-format
 msgid "Number of characters gdb thinks are in a line is %s.\n"
 msgstr ""
 
-#: utils.c:2722
+#: utils.c:2689
 #, possible-c-format
 msgid "Timestamping debugging messages is %s.\n"
 msgstr ""
 
-#: utils.c:2730
+#: utils.c:2697
 msgid "Set number of characters where GDB should wrap lines of its output."
 msgstr ""
 
-#: utils.c:2731
+#: utils.c:2698
 msgid "Show number of characters where GDB should wrap lines of its output."
 msgstr ""
 
-#: utils.c:2732
+#: utils.c:2699
 msgid ""
 "This affects where GDB wraps its output to fit the screen width.\n"
 "Setting this to \"unlimited\" or zero prevents GDB from wrapping its output."
 msgstr ""
 
-#: utils.c:2739
+#: utils.c:2706
 msgid "Set number of lines in a page for GDB output pagination."
 msgstr ""
 
-#: utils.c:2740
+#: utils.c:2707
 msgid "Show number of lines in a page for GDB output pagination."
 msgstr ""
 
-#: utils.c:2741
+#: utils.c:2708
 msgid ""
 "This affects the number of lines after which GDB will pause\n"
 "its output and ask you whether to continue.\n"
 "Setting this to \"unlimited\" or zero causes GDB never pause during output."
 msgstr ""
 
-#: utils.c:2752
+#: utils.c:2719
 msgid "Set state of GDB output pagination."
 msgstr ""
 
-#: utils.c:2753
+#: utils.c:2720
 msgid "Show state of GDB output pagination."
 msgstr ""
 
-#: utils.c:2754
+#: utils.c:2721
 msgid ""
 "When pagination is ON, GDB pauses at end of each screenful of\n"
 "its output and asks you whether to continue.\n"
 "Turning pagination off is an alternative to \"set height unlimited\"."
 msgstr ""
 
-#: utils.c:2765
+#: utils.c:2732
 msgid "Enable pagination"
 msgstr ""
 
-#: utils.c:2767
+#: utils.c:2734
 msgid "Disable pagination"
 msgstr ""
 
-#: utils.c:2771
+#: utils.c:2738
 msgid "Set printing of 8-bit characters in strings as \\nnn."
 msgstr ""
 
-#: utils.c:2772
+#: utils.c:2739
 msgid "Show printing of 8-bit characters in strings as \\nnn."
 msgstr ""
 
-#: utils.c:2779
+#: utils.c:2746
 msgid "Set timestamping of debugging messages."
 msgstr ""
 
-#: utils.c:2780
+#: utils.c:2747
 msgid "Show timestamping of debugging messages."
 msgstr ""
 
-#: utils.c:2781
+#: utils.c:2748
 msgid ""
 "When set, debugging messages will be marked with seconds and microseconds."
 msgstr ""
 
-#: utils.c:2865
+#: utils.c:2832
 #, possible-c-format
 msgid "invalid hex \"%s\""
 msgstr ""
 
-#: utils.c:2878
+#: utils.c:2845
 #, possible-c-format
 msgid "invalid decimal \"%s\""
 msgstr ""
 
-#: utils.c:3259
+#: utils.c:3226
 msgid "process-id to attach"
 msgstr ""
 
-#: utils.c:3265
+#: utils.c:3232
 #, possible-c-format
 msgid "Illegal process-id: %s."
 msgstr ""
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/ChangeLog ./gdb/testsuite/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/ChangeLog	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/testsuite/ChangeLog	2015-01-10 01:48:30.000000000 +0000
@@ -1,3 +1,70 @@
+2015-01-09  Pedro Alves  <palves@redhat.com>
+
+	* gdb.threads/non-stop-fair-events.c: New file.
+	* gdb.threads/non-stop-fair-events.exp: New file.
+
+2015-01-09  Pedro Alves  <palves@redhat.com>
+
+	* gdb.base/annota1.exp (thread_test): Use srcfile and binfile from
+	the global scope.  Set a breakpoint after all threads are started
+	rather than stepping over two source lines.  Expect the prompt.
+	* gdb.base/watch_thread_num.c (threads_started_barrier): New
+	global.
+	(NUM): Now 15.
+	(main): Use threads_started_barrier to wait for all threads to
+	start.  Main thread no longer calls thread_function.  Exit after
+	180 seconds.
+	(loop): New function.
+	(thread_function): Wait on threads_started_barrier barrier.  Call
+	'loop' at each iteration.
+	* gdb.base/watch_thread_num.exp: Continue to breakpoint after all
+	threads have started, instead of hardcoding number of "next"
+	steps.  Use an access watchpoint instead of a write watchpoint.
+
+2015-01-09  Pedro Alves  <palves@redhat.com>
+
+	* gdb.threads/ia64-sigill.c (threads_started_barrier): New global.
+	(thread_func): Wait on barrier.
+	(main): Wait for all threads to start before stopping GDB.
+	* gdb.threads/siginfo-threads.c (threads_started_barrier): New
+	global.
+	(thread1_func, thread2_func): Wait on barrier.
+	(main): Wait for all threads to start before stopping GDB.
+	* gdb.threads/watchthreads-reorder.c (threads_started_barrier):
+	New global.
+	(thread1_func, thread2_func): Wait on barrier.
+	(main): Wait for all threads to start before stopping GDB.
+
+2015-01-09  Pedro Alves  <palves@redhat.com>
+
+	* gdb.threads/attach-many-short-lived-threads.c: New file.
+	* gdb.threads/attach-many-short-lived-threads.exp: New file.
+
+2014-01-09  Pedro Alves  <palves@redhat.com>
+
+	* gdb.threads/fork-thread-pending.exp: Switch to the main thread
+	instead of to thread 2.
+	* gdb.threads/signal-command-multiple-signals-pending.c (main):
+	Add barrier around each pthread_create call instead of around all
+	calls.
+	* gdb.threads/signal-command-multiple-signals-pending.exp (test):
+	Set a break on thread_function and have the child threads hit it
+	one at at a time.
+
+2015-01-09  Pedro Alves  <palves@redhat.com>
+
+	* lib/gdb.exp (can_spawn_for_attach): New procedure.
+	(spawn_wait_for_attach): Error out if can_spawn_for_attach returns
+	false.
+	* gdb.base/attach.exp: Use can_spawn_for_attach instead of
+	checking whether the target board is remote.
+	* gdb.multi/multi-attach.exp: Likewise.
+	* gdb.python/py-sync-interp.exp: Likewise.
+	* gdb.server/ext-attach.exp: Likewise.
+	* gdb.python/py-prompt.exp: Use can_spawn_for_attach before the
+	tests that need to attach, instead of checking whether the target
+	board is remote at the top of the file.
+
 2015-01-08  Yao Qi  <yao@codesourcery.com>
 
 	* gdb.trace/entry-values.exp: Set call_insn for MIPS target.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.base/annota1.exp ./gdb/testsuite/gdb.base/annota1.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.base/annota1.exp	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/testsuite/gdb.base/annota1.exp	2015-01-10 01:48:30.000000000 +0000
@@ -440,7 +440,7 @@ if { [remote_file host exists core] } {
 }
 
 proc thread_test {} {
-    global subdir srcdir testfile
+    global subdir srcdir testfile srcfile binfile
     global gdb_prompt old_gdb_prompt
     set srcfile watch_thread_num.c
     set binfile [standard_output_file ${testfile}-watch_thread_num]
@@ -457,6 +457,9 @@ proc thread_test {} {
 	    return
 	}
 
+	set linenum [gdb_get_line_number "all threads started"]
+	gdb_breakpoint "$linenum"
+
 	set gdb_prompt \
 	    "\r\n\032\032pre-prompt\r\n$gdb_prompt \r\n\032\032prompt\r\n"
 
@@ -465,8 +468,8 @@ proc thread_test {} {
 	    }
 	}
 
-	gdb_test_multiple "next 2" "new thread" {
-	    -re ".*\032\032new-thread" {
+	gdb_test_multiple "continue" "new thread" {
+	    -re "\032\032new-thread.*\r\n$gdb_prompt$" {
 		pass "new thread"
 	    }
 	}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.base/attach.exp ./gdb/testsuite/gdb.base/attach.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.base/attach.exp	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/testsuite/gdb.base/attach.exp	2015-01-10 01:48:30.000000000 +0000
@@ -25,8 +25,7 @@ if { [istarget "hppa*-*-hpux*"] } {
     return 0
 }
 
-# are we on a target board
-if [is_remote target] then {
+if {![can_spawn_for_attach]} {
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.base/solib-overlap.exp ./gdb/testsuite/gdb.base/solib-overlap.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.base/solib-overlap.exp	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/testsuite/gdb.base/solib-overlap.exp	2015-01-10 01:48:30.000000000 +0000
@@ -31,8 +31,7 @@ if [skip_shlib_tests] {
     return 0
 }
 
-# Are we on a target board?  It is required for attaching to a process.
-if [is_remote target] {
+if {![can_spawn_for_attach]} {
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.base/watch_thread_num.c ./gdb/testsuite/gdb.base/watch_thread_num.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.base/watch_thread_num.c	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watch_thread_num.c	2015-01-10 01:48:30.000000000 +0000
@@ -27,7 +27,11 @@
 
 void *thread_function (void *arg); /* Pointer to function executed by each thread */
 
-#define NUM 5
+static pthread_barrier_t threads_started_barrier;
+
+#define NUM 15
+
+static int num_threads = NUM;
 
 static unsigned int shared_var = 1;
 
@@ -37,6 +41,8 @@ int main () {
     void *thread_result;
     long i;
 
+    pthread_barrier_init (&threads_started_barrier, NULL, NUM + 1);
+
     for (i = 0; i < NUM; i++)
       {
         res = pthread_create (&threads[i],
@@ -45,18 +51,29 @@ int main () {
 			     (void *) i);
       }
 
-    thread_result = thread_function ((void *) i);
+    pthread_barrier_wait (&threads_started_barrier);
+
+    sleep (180); /* all threads started */
 
     exit (EXIT_SUCCESS);
 }
 
+void
+loop (void)
+{
+}
+
 void *thread_function (void *arg) {
     int my_number = (long) arg;
+
+    pthread_barrier_wait (&threads_started_barrier);
+
     /* Don't run forever.  Run just short of it :)  */
     while (shared_var > 0)
       {
         shared_var++;
 	usleep (1); /* Loop increment.  */
+	loop ();
       }
 
     pthread_exit (NULL);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.base/watch_thread_num.exp ./gdb/testsuite/gdb.base/watch_thread_num.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.base/watch_thread_num.exp	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/testsuite/gdb.base/watch_thread_num.exp	2015-01-10 01:48:30.000000000 +0000
@@ -47,12 +47,14 @@ if { ![runto main] } then {
 gdb_test "watch shared_var thread 0" "Unknown thread 0\." "Watchpoint on invalid thread"
 gdb_test "watch shared_var thread" "A syntax error in expression, near `thread'\." "Invalid watch syntax"
 
-gdb_test "Next 5" ".*"
+set bpexitline [gdb_get_line_number "all threads started"]
+gdb_breakpoint "$bpexitline"
+gdb_continue_to_breakpoint "all threads started"
 
-gdb_test "break thread_function" "Breakpoint \[0-9\].*" \
-  "Set breakpoint at thread_function"
+gdb_test "break loop" "Breakpoint \[0-9\].*" \
+  "Set breakpoint at loop"
 
-gdb_test "continue" ".*Breakpoint 2.*" "Stopped in thread_function"
+gdb_test "continue" ".*Breakpoint .*loop.*" "Stopped in loop"
 
 gdb_test_multiple "thread" "Thread command" {
     -re ".*Current thread is (\[0-9\]*).*$gdb_prompt $" {
@@ -62,15 +64,35 @@ gdb_test_multiple "thread" "Thread comma
 
 set thread_num "$expect_out(1,string)"
 
-gdb_test_no_output "disable 2" "Disable breakpoint 2"
-gdb_test "watch shared_var thread $thread_num" "Hardware watchpoint 3: shared_var" "Watchpoint on shared variable"
-gdb_test "info breakpoint 3" "stop only in thread $thread_num"
+delete_breakpoints
 
-for {set i 1} {$i <= 10} {incr i 1} {
+# We use an access watchpoint rather than a write watchpoint, because
+# GDB can drop the latter when multiple threads trigger events
+# simultaneously, on targets with continuable watchpoints, such as
+# x86.  See PR breakpoints/10116.
+
+gdb_test "awatch shared_var thread $thread_num" \
+    "Hardware access \\(read/write\\) watchpoint .*: shared_var.*" \
+    "Watchpoint on shared variable"
+
+gdb_test "info breakpoint \$bpnum" \
+    "stop only in thread $thread_num" \
+    "info breakpoint shows watchpoint is thread-specific"
+
+for {set i 1} {$i <= 5} {incr i} {
     set watchpoint "Watchpoint triggered iteration $i"
     set check "Check thread that triggered iteration $i"
 
-    gdb_test "continue" "Hardware watchpoint 3: shared_var.*" $watchpoint
+    set test $watchpoint
+    gdb_test_multiple "continue" $test {
+	-re "infrun:" {
+	    # Avoid timeouts when debugging GDB.
+	    exp_continue
+	}
+	-re "Hardware access \\(read/write\\) watchpoint .*: shared_var.*$gdb_prompt $" {
+	    pass $test
+	}
+    }
     gdb_test "thread" ".*Current thread is $thread_num .*" $check
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.multi/multi-attach.exp ./gdb/testsuite/gdb.multi/multi-attach.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.multi/multi-attach.exp	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/testsuite/gdb.multi/multi-attach.exp	2015-01-10 01:48:30.000000000 +0000
@@ -19,8 +19,7 @@
 
 standard_testfile
 
-# We need to use TCL's exec to get the pid.
-if [is_remote target] then {
+if {![can_spawn_for_attach]} {
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.python/py-prompt.exp ./gdb/testsuite/gdb.python/py-prompt.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.python/py-prompt.exp	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-prompt.exp	2015-01-10 01:48:30.000000000 +0000
@@ -18,11 +18,6 @@
 
 standard_testfile
 
-# We need to use TCL's exec to get the pid.
-if [is_remote target] then {
-    return 0
-}
-
 load_lib gdb-python.exp
 load_lib prompt.exp
 
@@ -80,6 +75,10 @@ gdb_test "python print (\"'\" + str(p\[0
 	 "prompt_hook argument is default prompt. 2"
 gdb_exit
 
+if {![can_spawn_for_attach]} {
+    return 0
+}
+
 set testpid [spawn_wait_for_attach $binfile]
 
 set GDBFLAGS [concat $tmp_gdbflags " -ex \"set pagination off\""]
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.python/py-sync-interp.exp ./gdb/testsuite/gdb.python/py-sync-interp.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.python/py-sync-interp.exp	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/testsuite/gdb.python/py-sync-interp.exp	2015-01-10 01:48:30.000000000 +0000
@@ -20,8 +20,7 @@
 
 standard_testfile
 
-# We need to use TCL's exec to get the pid.
-if [is_remote target] then {
+if {![can_spawn_for_attach]} {
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.server/ext-attach.exp ./gdb/testsuite/gdb.server/ext-attach.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.server/ext-attach.exp	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/testsuite/gdb.server/ext-attach.exp	2015-01-10 01:48:30.000000000 +0000
@@ -26,8 +26,7 @@ if { [skip_gdbserver_tests] } {
     return 0
 }
 
-# We need to use TCL's exec to get the pid.
-if [is_remote target] then {
+if {![can_spawn_for_attach]} {
     return 0
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.c ./gdb/testsuite/gdb.threads/attach-many-short-lived-threads.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/attach-many-short-lived-threads.c	2015-01-10 01:48:30.000000000 +0000
@@ -0,0 +1,151 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2014-2015 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#define _GNU_SOURCE
+#include <assert.h>
+#include <pthread.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+
+pthread_t main_thread;
+pthread_attr_t detached_attr;
+pthread_attr_t joinable_attr;
+
+/* Number of threads we'll create of each variant
+   (joinable/detached).  */
+int n_threads = 50;
+
+/* Mutex used to hold creating detached threads.  */
+pthread_mutex_t dthrds_create_mutex;
+
+/* Wrapper for pthread_create.   */
+
+void
+create_thread (pthread_attr_t *attr,
+	       void *(*start_routine) (void *), void *arg)
+{
+  pthread_t child;
+  int rc;
+
+  while ((rc = pthread_create (&child, attr, start_routine, arg)) != 0)
+    {
+      fprintf (stderr, "unexpected error from pthread_create: %s (%d)\n",
+	       strerror (rc), rc);
+      sleep (1);
+    }
+}
+
+void
+break_fn (void)
+{
+}
+
+/* Data passed to joinable threads on creation.  This is allocated on
+   the heap and ownership transferred from parent to child.  (We do
+   this because it's not portable to cast pthread_t to pointer.)  */
+
+struct thread_arg
+{
+  pthread_t parent;
+};
+
+/* Entry point for joinable threads.  These threads first join their
+   parent before spawning a new child (and exiting).  The parent's tid
+   is passed as pthread_create argument, encapsulated in a struct
+   thread_arg object.  */
+
+void *
+joinable_fn (void *arg)
+{
+  struct thread_arg *p = arg;
+
+  pthread_setname_np (pthread_self (), "joinable");
+
+  if (p->parent != main_thread)
+    assert (pthread_join (p->parent, NULL) == 0);
+
+  p->parent = pthread_self ();
+
+  create_thread (&joinable_attr, joinable_fn, p);
+
+  break_fn ();
+
+  return NULL;
+}
+
+/* Entry point for detached threads.  */
+
+void *
+detached_fn (void *arg)
+{
+  pthread_setname_np (pthread_self (), "detached");
+
+  /* This should throttle threads a bit in case we manage to spawn
+     threads faster than they exit.  */
+  pthread_mutex_lock (&dthrds_create_mutex);
+
+  create_thread (&detached_attr, detached_fn, NULL);
+
+  /* Note this is called before the mutex is unlocked otherwise in
+     non-stop mode, when the breakpoint is hit we'd keep spawning more
+     threads forever while the old threads stay alive (stopped in the
+     breakpoint).  */
+  break_fn ();
+
+  pthread_mutex_unlock (&dthrds_create_mutex);
+
+  return NULL;
+}
+
+int
+main (int argc, char *argv[])
+{
+  int i;
+
+  if (argc > 1)
+    n_threads = atoi (argv[1]);
+
+  pthread_mutex_init (&dthrds_create_mutex, NULL);
+
+  pthread_attr_init (&detached_attr);
+  pthread_attr_setdetachstate (&detached_attr, PTHREAD_CREATE_DETACHED);
+  pthread_attr_init (&joinable_attr);
+  pthread_attr_setdetachstate (&joinable_attr, PTHREAD_CREATE_JOINABLE);
+
+  main_thread = pthread_self ();
+
+  /* Spawn the initial set of test threads.  Some threads are
+     joinable, others are detached.  This exercises different code
+     paths in the runtime.  */
+  for (i = 0; i < n_threads; ++i)
+    {
+      struct thread_arg *p;
+
+      p = malloc (sizeof *p);
+      p->parent = main_thread;
+      create_thread (&joinable_attr, joinable_fn, p);
+
+      create_thread (&detached_attr, detached_fn, NULL);
+    }
+
+  /* Long enough for all the attach/detach sequences done by the .exp
+     file.  */
+  sleep (180);
+  return 0;
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp ./gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp	2015-01-10 01:48:30.000000000 +0000
@@ -0,0 +1,132 @@
+# Copyright 2008-2015 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test attaching to a program that is constantly spawning short-lived
+# threads.  The stresses the edge cases of attaching to threads that
+# have just been created or are in process of dying.  In addition, the
+# test attaches, debugs, detaches, reattaches in a loop a few times,
+# to stress the behavior of the debug API around detach (some systems
+# end up leaving stale state behind that confuse the following
+# attach).
+
+if {![can_spawn_for_attach]} {
+    return 0
+}
+
+standard_testfile
+
+# The test proper.  See description above.
+
+proc test {} {
+    global binfile
+    global gdb_prompt
+    global decimal
+
+    clean_restart ${binfile}
+
+    set testpid [spawn_wait_for_attach $binfile]
+
+    set attempts 10
+    for {set attempt 1} { $attempt <= $attempts } { incr attempt } {
+	with_test_prefix "iter $attempt" {
+	    set attached 0
+	    set eperm 0
+	    set test "attach"
+	    gdb_test_multiple "attach $testpid" $test {
+		-re "new threads in iteration" {
+		    # Seen when "set debug libthread_db" is on.
+		    exp_continue
+		}
+		-re "warning: Cannot attach to lwp $decimal: Operation not permitted" {
+		    # On Linux, PTRACE_ATTACH sometimes fails with
+		    # EPERM, even though /proc/PID/status indicates
+		    # the thread is running.
+		    set eperm 1
+		    exp_continue
+		}
+		-re "debugger service failed.*$gdb_prompt $" {
+		    fail $test
+		}
+		-re "$gdb_prompt $" {
+		    if {$eperm} {
+			xfail "$test (EPERM)"
+		    } else {
+			pass $test
+		    }
+		}
+		-re "Attaching to program.*process $testpid.*$gdb_prompt $" {
+		    pass $test
+		}
+	    }
+
+	    # Sleep a bit and try updating the thread list.  We should
+	    # know about all threads already at this point.  If we see
+	    # "New Thread" or similar being output, then "attach" is
+	    # failing to actually attach to all threads in the process,
+	    # which would be a bug.
+	    sleep 1
+
+	    set test "no new threads"
+	    gdb_test_multiple "info threads" $test {
+		-re "New .*$gdb_prompt $" {
+		    fail $test
+		}
+		-re "$gdb_prompt $" {
+		    pass $test
+		}
+	    }
+
+	    # Force breakpoints always inserted, so that threads we might
+	    # have failed to attach to hit them even when threads we do
+	    # know about are stopped.
+	    gdb_test_no_output "set breakpoint always-inserted on"
+
+	    # Run to a breakpoint a few times.  A few threads should spawn
+	    # and die meanwhile.  This checks that thread creation/death
+	    # events carry on correctly after attaching.  Also, be
+	    # detaching from the program and reattaching, we check that
+	    # the program doesn't die due to gdb leaving a pending
+	    # breakpoint hit on a new thread unprocessed.
+	    gdb_test "break break_fn" "Breakpoint.*" "break break_fn"
+
+	    # Wait a bit, to give time for most threads to hit the
+	    # breakpoint, including threads we might have failed to
+	    # attach.
+	    sleep 2
+
+	    set bps 3
+	    for {set bp 1} { $bp <= $bps } { incr bp } {
+		gdb_test "continue" "Breakpoint.*" "break at break_fn: $bp"
+	    }
+
+	    if {$attempt < $attempts} {
+		gdb_test "detach" "Detaching from.*"
+	    } else {
+		gdb_test "kill" "" "kill process" "Kill the program being debugged.*y or n. $" "y"
+	    }
+
+	    gdb_test_no_output "set breakpoint always-inserted off"
+	    delete_breakpoints
+	}
+    }
+
+    remote_exec target "kill -9 ${testpid}"
+}
+
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
+    return -1
+}
+
+test
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.threads/fork-thread-pending.exp ./gdb/testsuite/gdb.threads/fork-thread-pending.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.threads/fork-thread-pending.exp	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/fork-thread-pending.exp	2015-01-10 01:48:30.000000000 +0000
@@ -46,7 +46,7 @@ gdb_test "continue" "Catchpoint.*" "1, g
 
 gdb_test "info threads" " Thread .* Thread .* Thread .* Thread .*" "1, multiple threads found"
 
-gdb_test "thread 2" ".*" "1, switched away from event thread"
+gdb_test "thread 1" ".*" "1, switched away from event thread"
 
 gdb_test "continue" "Not resuming.*" "1, refused to resume"
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.threads/ia64-sigill.c ./gdb/testsuite/gdb.threads/ia64-sigill.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.threads/ia64-sigill.c	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/ia64-sigill.c	2015-01-10 01:48:30.000000000 +0000
@@ -44,6 +44,8 @@ static pthread_mutex_t thread2_tid_mutex
 
 static pthread_mutex_t terminate_mutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
 
+static pthread_barrier_t threads_started_barrier;
+
 /* Do not use alarm as it would create a ptrace event which would hang up us if
    we are being traced by GDB which we stopped ourselves.  */
 
@@ -78,6 +80,8 @@ thread_func (void *threadno_voidp)
   int threadno = (intptr_t) threadno_voidp;
   int i;
 
+  pthread_barrier_wait (&threads_started_barrier);
+
   switch (threadno)
   {
     case 1:
@@ -272,6 +276,8 @@ main (int argc, char **argv)
 
   timed_mutex_lock (&terminate_mutex);
 
+  pthread_barrier_init (&threads_started_barrier, NULL, 3);
+
   i = pthread_create (&thread1, NULL, thread_func, (void *) (intptr_t) 1);
   assert (i == 0);
 
@@ -298,6 +304,11 @@ main (int argc, char **argv)
 
   atexit (cleanup);
 
+  /* Wait until all threads are seen running.  On Linux (at least),
+     new threads start stopped, and the debugger must resume them.
+     Need to wait for that before stopping GDB.  */
+  pthread_barrier_wait (&threads_started_barrier);
+
   printf ("Stopping GDB PID %lu.\n", (unsigned long) tracer);
 
   if (tracer)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.threads/non-stop-fair-events.c ./gdb/testsuite/gdb.threads/non-stop-fair-events.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.threads/non-stop-fair-events.c	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/non-stop-fair-events.c	2015-01-10 01:48:30.000000000 +0000
@@ -0,0 +1,84 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2014-2015 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <pthread.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <signal.h>
+
+#define NUM_THREADS 10
+const int num_threads = NUM_THREADS;
+
+pthread_t child_thread[NUM_THREADS];
+volatile pthread_t signal_thread;
+volatile int got_sig;
+
+void
+handler (int signo)
+{
+  got_sig = 1;
+}
+
+void
+loop_broke (void)
+{
+}
+
+#define INF_LOOP				\
+  do						\
+    {						\
+      while (!got_sig)				\
+	;					\
+    }						\
+  while (0)
+
+void *
+child_function (void *arg)
+{
+  pthread_t self = pthread_self ();
+
+  while (1)
+    {
+      INF_LOOP; /* set thread breakpoint here */
+      loop_broke ();
+    }
+}
+
+int
+main (void)
+{
+  int res;
+  int i;
+
+  alarm (60);
+
+  signal (SIGUSR1, handler);
+
+  for (i = 0; i < NUM_THREADS; i++)
+    {
+      res = pthread_create (&child_thread[i], NULL, child_function, NULL);
+    }
+
+  while (1)
+    {
+      pthread_kill (signal_thread, SIGUSR1); /* set kill breakpoint here */
+      INF_LOOP;
+      loop_broke ();
+    }
+
+  exit(EXIT_SUCCESS);
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.threads/non-stop-fair-events.exp ./gdb/testsuite/gdb.threads/non-stop-fair-events.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.threads/non-stop-fair-events.exp	1970-01-01 00:00:00.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/non-stop-fair-events.exp	2015-01-10 01:48:30.000000000 +0000
@@ -0,0 +1,161 @@
+# Copyright (C) 2014-2015 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test that GDB in non-stop mode gives roughly equal priority to
+# events of all threads.
+
+standard_testfile
+set executable ${testfile}
+
+if [target_info exists gdb,nosignals] {
+    verbose "Skipping ${testfile}.exp because of nosignals."
+    return -1
+}
+
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
+    return -1
+}
+
+gdb_test_no_output "set non-stop on"
+
+if ![runto_main] {
+    return -1
+}
+
+# We want "handle print", to make sure the target backend reports the
+# signal to the run control core.
+gdb_test "handle SIGUSR1 print nostop pass" ""
+
+# Get current value of VAR from the inferior.  TEST is used as test
+# message.
+
+proc get_value {var test} {
+    global expect_out
+    global gdb_prompt
+    global decimal
+
+    set value -1
+    gdb_test_multiple "print $var" "$test" {
+	-re ".*= ($decimal).*\r\n$gdb_prompt $" {
+	    set value $expect_out(1,string)
+	    pass "$test"
+        }
+    }
+    return ${value}
+}
+
+set NUM_THREADS [get_value "num_threads" "get num_threads"]
+
+# Account for the main thread.
+incr NUM_THREADS
+
+# Run threads to their start positions.  This prepares for a new test
+# sequence.
+
+proc restart {} {
+    global gdb_prompt
+    global NUM_THREADS
+
+    delete_breakpoints
+
+    gdb_test "print got_sig = 0" " = 0"
+
+    gdb_breakpoint [gdb_get_line_number "set thread breakpoint here"]
+    gdb_breakpoint [gdb_get_line_number "set kill breakpoint here"]
+
+    set test "continue -a&"
+    gdb_test_multiple $test $test {
+	-re "Continuing.\r\n$gdb_prompt " {
+	    pass $test
+	}
+    }
+
+    for {set i 1} { $i <= $NUM_THREADS } { incr i } {
+	set test "thread $i restarted"
+	gdb_test_multiple "" $test {
+	    -re "breakpoint here" {
+		# The prompt was already matched in the "continue &"
+		# test above.  We're now consuming asynchronous output
+		# that comes after the prompt.
+		pass $test
+	    }
+	}
+    }
+
+    delete_breakpoints
+}
+
+# The test proper.  SIGNAL_THREAD is the thread that has been elected
+# to receive the SIGUSR1 signal.
+
+proc test {signal_thread} {
+    global gdb_prompt
+    global NUM_THREADS
+
+    with_test_prefix "signal_thread=$signal_thread" {
+	restart
+
+	# Set all threads stepping the infinite loop line in parallel.
+	for {set i 2} { $i <= $NUM_THREADS } { incr i } {
+	    gdb_test "thread $i" \
+		"child_function.*set thread breakpoint here.*" \
+		"switch to thread $i to step it"
+
+	    if {$i == $signal_thread} {
+		gdb_test "print signal_thread = self" " = .*"
+	    }
+
+	    gdb_test "step&" "" "set $i thread stepping"
+	}
+
+	gdb_test "thread 1" "Switching to .*" \
+	    "switch to the main thread to queue signal"
+
+	# Let the main thread queue the signal.
+	gdb_breakpoint "loop_broke"
+	set test "continue &"
+	gdb_test_multiple $test $test {
+	    -re "Continuing.\r\n$gdb_prompt " {
+		pass $test
+	    }
+	}
+
+	# Wait for all threads to finish their steps, and for the main
+	# thread to hit the breakpoint.
+	for {set i 1} { $i <= $NUM_THREADS } { incr i } {
+	    set test "thread $i broke out of loop"
+	    gdb_test_multiple "" $test {
+		-re "loop_broke" {
+		    # The prompt was already matched in the "continue
+		    # &" test above.  We're now consuming asynchronous
+		    # output that comes after the prompt.
+		    pass $test
+		}
+	    }
+	}
+
+	# It's helpful to have this in the log if the test ever
+	# happens to fail.
+	gdb_test "info threads"
+    }
+}
+
+# The kernel/debug API may always walk its thread list looking for the
+# first with an event, resulting in giving priority to e.g. the thread
+# with lowest kernel thread ID.  So test once with the signal pending
+# in each thread, except the main thread.
+for {set i 2} { $i <= $NUM_THREADS } { incr i } {
+    test $i
+}
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.threads/siginfo-threads.c ./gdb/testsuite/gdb.threads/siginfo-threads.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.threads/siginfo-threads.c	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/siginfo-threads.c	2015-01-10 01:48:30.000000000 +0000
@@ -54,6 +54,8 @@ static int thread2_sigusr2_hit;
 static pthread_mutex_t terminate_mutex
   = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
 
+static pthread_barrier_t threads_started_barrier;
+
 /* Do not use alarm as it would create a ptrace event which would hang
    us up if we are being traced by GDB, which we stopped
    ourselves.  */
@@ -128,6 +130,8 @@ thread1_func (void *unused)
 {
   int i;
 
+  pthread_barrier_wait (&threads_started_barrier);
+
   timed_mutex_lock (&thread1_tid_mutex);
 
   /* THREAD1_TID_MUTEX must be already locked to avoid a race.  */
@@ -163,6 +167,8 @@ thread2_func (void *unused)
 {
   int i;
 
+  pthread_barrier_wait (&threads_started_barrier);
+
   timed_mutex_lock (&thread2_tid_mutex);
 
   /* THREAD2_TID_MUTEX must be already locked to avoid a race.  */
@@ -354,6 +360,8 @@ main (int argc, char **argv)
   assert_perror (errno);
   assert (i == 0);
 
+  pthread_barrier_init (&threads_started_barrier, NULL, 3);
+
   i = pthread_create (&thread1, NULL, thread1_func, NULL);
   assert (i == 0);
 
@@ -380,6 +388,11 @@ main (int argc, char **argv)
 
   atexit (cleanup);
 
+  /* Wait until all threads are seen running.  On Linux (at least),
+     new threads start stopped, and the debugger must resume them.
+     Need to wait for that before stopping GDB.  */
+  pthread_barrier_wait (&threads_started_barrier);
+
   printf ("Stopping GDB PID %lu.\n", (unsigned long) tracer);
 
   if (tracer)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.c ./gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.c	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.c	2015-01-10 01:48:30.000000000 +0000
@@ -76,12 +76,13 @@ main (void)
   signal (SIGUSR1, handler_sigusr1);
   signal (SIGUSR2, handler_sigusr2);
 
-  pthread_barrier_init (&barrier, NULL, 3);
-
   for (i = 0; i < 2; i++)
-    pthread_create (&child_thread[i], NULL, thread_function, NULL);
-
-  pthread_barrier_wait (&barrier);
+    {
+      pthread_barrier_init (&barrier, NULL, 2);
+      pthread_create (&child_thread[i], NULL, thread_function, NULL);
+      pthread_barrier_wait (&barrier);
+      pthread_barrier_destroy (&barrier);
+    }
 
   all_threads_started ();
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp ./gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp	2015-01-10 01:48:30.000000000 +0000
@@ -46,6 +46,13 @@ proc test { schedlock } {
 	gdb_test "handle SIGUSR2 stop print pass"
 
 	gdb_test "break all_threads_started" "Breakpoint .* at .*$srcfile.*"
+
+	# Create threads one at a time, to insure stable thread
+	# numbers between runs and targets.
+	gdb_test "break thread_function" "Breakpoint .* at .*$srcfile.*"
+	gdb_test "continue" "thread_function.*" "thread 2 created"
+	gdb_test "continue" "thread_function.*" "thread 3 created"
+
 	gdb_test "continue" "all_threads_started.*"
 
 	# Using schedlock, let the main thread queue a signal for each
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.threads/watchthreads-reorder.c ./gdb/testsuite/gdb.threads/watchthreads-reorder.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/gdb.threads/watchthreads-reorder.c	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/testsuite/gdb.threads/watchthreads-reorder.c	2015-01-10 01:48:30.000000000 +0000
@@ -44,6 +44,8 @@ static pthread_mutex_t thread2_tid_mutex
 
 static pthread_mutex_t terminate_mutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
 
+static pthread_barrier_t threads_started_barrier;
+
 /* These variables must have lower in-memory addresses than thread1_rwatch and
    thread2_rwatch so that they take their watchpoint slots.  */
 
@@ -87,6 +89,8 @@ thread1_func (void *unused)
   int i;
   volatile int rwatch_store;
 
+  pthread_barrier_wait (&threads_started_barrier);
+
   timed_mutex_lock (&thread1_tid_mutex);
 
   /* THREAD1_TID_MUTEX must be already locked to avoid race.  */
@@ -113,6 +117,8 @@ thread2_func (void *unused)
   int i;
   volatile int rwatch_store;
 
+  pthread_barrier_wait (&threads_started_barrier);
+
   timed_mutex_lock (&thread2_tid_mutex);
 
   /* THREAD2_TID_MUTEX must be already locked to avoid race.  */
@@ -279,6 +285,8 @@ main (int argc, char **argv)
 
   timed_mutex_lock (&terminate_mutex);
 
+  pthread_barrier_init (&threads_started_barrier, NULL, 3);
+
   i = pthread_create (&thread1, NULL, thread1_func, NULL);
   assert (i == 0);
 
@@ -305,6 +313,11 @@ main (int argc, char **argv)
 
   atexit (cleanup);
 
+  /* Wait until all threads are seen running.  On Linux (at least),
+     new threads start stopped, and the debugger must resume them.
+     Need to wait for that before stopping GDB.  */
+  pthread_barrier_wait (&threads_started_barrier);
+
   printf ("Stopping GDB PID %lu.\n", (unsigned long) tracer);
 
   if (tracer)
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/lib/gdb.exp ./gdb/testsuite/lib/gdb.exp
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/testsuite/lib/gdb.exp	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/testsuite/lib/gdb.exp	2015-01-10 01:48:30.000000000 +0000
@@ -3413,12 +3413,39 @@ proc gdb_exit { } {
     catch default_gdb_exit
 }
 
+# Return true if we can spawn a program on the target and attach to
+# it.
+
+proc can_spawn_for_attach { } {
+    # We use TCL's exec to get the inferior's pid.
+    if [is_remote target] then {
+	return 0
+    }
+
+    # The "attach" command doesn't make sense when the target is
+    # stub-like, where GDB finds the program already started on
+    # initial connection.
+    if {[target_info exists use_gdb_stub]} {
+	return 0
+    }
+
+    # Assume yes.
+    return 1
+}
+
 # Start a set of programs running and then wait for a bit, to be sure
 # that they can be attached to.  Return a list of the processes' PIDs.
+# It's a test error to call this when [can_spawn_for_attach] is false.
 
 proc spawn_wait_for_attach { executable_list } {
     set pid_list {}
 
+    if ![can_spawn_for_attach] {
+	# The caller should have checked can_spawn_for_attach itself
+	# before getting here.
+	error "can't spawn for attach with this target/board"
+    }
+
     foreach {executable} $executable_list {
 	lappend pid_list [eval exec $executable &]
     }
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/tui/tui-hooks.c ./gdb/tui/tui-hooks.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/tui/tui-hooks.c	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/tui/tui-hooks.c	2015-01-10 01:48:30.000000000 +0000
@@ -63,68 +63,6 @@ tui_new_objfile_hook (struct objfile* ob
     tui_display_main ();
 }
 
-static int ATTRIBUTE_PRINTF (1, 0)
-tui_query_hook (const char *msg, va_list argp)
-{
-  int retval;
-  int ans2;
-  int answer;
-  char *question;
-  struct cleanup *old_chain;
-
-  /* Format the question outside of the loop, to avoid reusing
-     ARGP.  */
-  question = xstrvprintf (msg, argp);
-  old_chain = make_cleanup (xfree, question);
-
-  echo ();
-  while (1)
-    {
-      wrap_here ("");		/* Flush any buffered output.  */
-      gdb_flush (gdb_stdout);
-
-      fputs_filtered (question, gdb_stdout);
-      printf_filtered (_("(y or n) "));
-
-      wrap_here ("");
-      gdb_flush (gdb_stdout);
-
-      answer = tui_getc (stdin);
-      clearerr (stdin);		/* in case of C-d */
-      if (answer == EOF)	/* C-d */
-	{
-	  retval = 1;
-	  break;
-	}
-      /* Eat rest of input line, to EOF or newline.  */
-      if (answer != '\n')
-	do
-	  {
-            ans2 = tui_getc (stdin);
-	    clearerr (stdin);
-	  }
-	while (ans2 != EOF && ans2 != '\n' && ans2 != '\r');
-
-      if (answer >= 'a')
-	answer -= 040;
-      if (answer == 'Y')
-	{
-	  retval = 1;
-	  break;
-	}
-      if (answer == 'N')
-	{
-	  retval = 0;
-	  break;
-	}
-      printf_filtered (_("Please answer y or n.\n"));
-    }
-  noecho ();
-
-  do_cleanups (old_chain);
-  return retval;
-}
-
 /* Prevent recursion of deprecated_register_changed_hook().  */
 static int tui_refreshing_registers = 0;
 
@@ -263,8 +201,6 @@ tui_install_hooks (void)
   deprecated_print_frame_info_listing_hook
     = tui_print_frame_info_listing_hook;
 
-  deprecated_query_hook = tui_query_hook;
-
   /* Install the event hooks.  */
   tui_bp_created_observer
     = observer_attach_breakpoint_created (tui_event_create_breakpoint);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/tui/tui-io.c ./gdb/tui/tui-io.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/tui/tui-io.c	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/tui/tui-io.c	2015-01-10 01:48:30.000000000 +0000
@@ -234,20 +234,23 @@ tui_redisplay_readline (void)
     {
       waddch (w, prompt[in]);
       getyx (w, line, col);
-      if (col < prev_col)
+      if (col <= prev_col)
         height++;
       prev_col = col;
     }
-  for (in = 0; in < rl_end; in++)
+  for (in = 0; in <= rl_end; in++)
     {
       unsigned char c;
       
-      c = (unsigned char) rl_line_buffer[in];
       if (in == rl_point)
 	{
           getyx (w, c_line, c_pos);
 	}
 
+      if (in == rl_end)
+        break;
+
+      c = (unsigned char) rl_line_buffer[in];
       if (CTRL_CHAR (c) || c == RUBOUT)
 	{
           waddch (w, '^');
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/utils.c ./gdb/utils.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/utils.c	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/utils.c	2015-01-10 01:48:30.000000000 +0000
@@ -1198,12 +1198,11 @@ compile_rx_or_error (regex_t *pattern, c
 static int ATTRIBUTE_PRINTF (1, 0)
 defaulted_query (const char *ctlstr, const char defchar, va_list args)
 {
-  int answer;
   int ans2;
   int retval;
   int def_value;
   char def_answer, not_def_answer;
-  char *y_string, *n_string, *question;
+  char *y_string, *n_string, *question, *prompt;
   /* Used to add duration we waited for user to respond to
      prompt_for_continue_wait_time.  */
   struct timeval prompt_started, prompt_ended, prompt_delta;
@@ -1263,62 +1262,31 @@ defaulted_query (const char *ctlstr, con
 
   /* Format the question outside of the loop, to avoid reusing args.  */
   question = xstrvprintf (ctlstr, args);
+  prompt = xstrprintf (_("%s%s(%s or %s) %s"),
+		      annotation_level > 1 ? "\n\032\032pre-query\n" : "",
+		      question, y_string, n_string,
+		      annotation_level > 1 ? "\n\032\032query\n" : "");
+  xfree (question);
 
   /* Used for calculating time spend waiting for user.  */
   gettimeofday (&prompt_started, NULL);
 
   while (1)
     {
-      wrap_here ("");		/* Flush any buffered output.  */
-      gdb_flush (gdb_stdout);
-
-      if (annotation_level > 1)
-	printf_filtered (("\n\032\032pre-query\n"));
+      char *response, answer;
 
-      fputs_filtered (question, gdb_stdout);
-      printf_filtered (_("(%s or %s) "), y_string, n_string);
-
-      if (annotation_level > 1)
-	printf_filtered (("\n\032\032query\n"));
-
-      wrap_here ("");
       gdb_flush (gdb_stdout);
+      response = gdb_readline_wrapper (prompt);
 
-      answer = fgetc (stdin);
-
-      /* We expect fgetc to block until a character is read.  But
-         this may not be the case if the terminal was opened with
-         the NONBLOCK flag.  In that case, if there is nothing to
-         read on stdin, fgetc returns EOF, but also sets the error
-         condition flag on stdin and errno to EAGAIN.  With a true
-         EOF, stdin's error condition flag is not set.
-
-         A situation where this behavior was observed is a pseudo
-         terminal on AIX.  */
-      while (answer == EOF && ferror (stdin) && errno == EAGAIN)
-        {
-          /* Not a real EOF.  Wait a little while and try again until
-             we read something.  */
-          clearerr (stdin);
-          gdb_usleep (10000);
-          answer = fgetc (stdin);
-        }
-
-      clearerr (stdin);		/* in case of C-d */
-      if (answer == EOF)	/* C-d */
+      if (response == NULL)	/* C-d  */
 	{
 	  printf_filtered ("EOF [assumed %c]\n", def_answer);
 	  retval = def_value;
 	  break;
 	}
-      /* Eat rest of input line, to EOF or newline.  */
-      if (answer != '\n')
-	do
-	  {
-	    ans2 = fgetc (stdin);
-	    clearerr (stdin);
-	  }
-	while (ans2 != EOF && ans2 != '\n' && ans2 != '\r');
+
+      answer = response[0];
+      xfree (response);
 
       if (answer >= 'a')
 	answer -= 040;
@@ -1333,8 +1301,7 @@ defaulted_query (const char *ctlstr, con
          specify the required input or have it default by entering
          nothing.  */
       if (answer == def_answer
-	  || (defchar != '\0' &&
-	      (answer == '\n' || answer == '\r' || answer == EOF)))
+	  || (defchar != '\0' && answer == '\0'))
 	{
 	  retval = def_value;
 	  break;
@@ -1350,7 +1317,7 @@ defaulted_query (const char *ctlstr, con
   timeval_add (&prompt_for_continue_wait_time,
                &prompt_for_continue_wait_time, &prompt_delta);
 
-  xfree (question);
+  xfree (prompt);
   if (annotation_level > 1)
     printf_filtered (("\n\032\032post-query\n"));
   return retval;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/x86-linux-nat.c ./gdb/x86-linux-nat.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/gdb/x86-linux-nat.c	2015-01-09 01:48:37.000000000 +0000
+++ ./gdb/x86-linux-nat.c	2015-01-10 01:48:30.000000000 +0000
@@ -214,7 +214,7 @@ x86_linux_prepare_to_resume (struct lwp_
       lwp->arch_private->debug_registers_changed = 0;
     }
 
-  if (clear_status || lwp->stopped_by_watchpoint)
+  if (clear_status || lwp->stop_reason == LWP_STOPPED_BY_WATCHPOINT)
     x86_linux_dr_set (lwp->ptid, DR_STATUS, 0);
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/include/elf/ChangeLog ./include/elf/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/include/elf/ChangeLog	2015-01-09 01:48:38.000000000 +0000
+++ ./include/elf/ChangeLog	2015-01-10 01:48:30.000000000 +0000
@@ -1,3 +1,8 @@
+2015-01-09  Anthony Green  <green@moxielogic.com>
+
+	* common.h (EM_MOXIE): Redefine to official number.
+	(EM_MOXIE_OLD): Define (from old number).
+
 2015-01-01  Alan Modra  <amodra@gmail.com>
 
 	Update year range in copyright notice of all files.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/include/elf/common.h ./include/elf/common.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/include/elf/common.h	2015-01-09 01:48:38.000000000 +0000
+++ ./include/elf/common.h	2015-01-10 01:48:30.000000000 +0000
@@ -302,6 +302,7 @@
 #define EM_INTEL208	208	/* Reserved by Intel */
 #define EM_INTEL209	209	/* Reserved by Intel */
 #define EM_VISIUM	221	/* Controls and Data Services VISIUMcore processor */
+#define EM_MOXIE        223     /* Moxie processor family */
 
 /* If it is necessary to assign new unofficial EM_* values, please pick large
    random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision
@@ -394,7 +395,8 @@
 
 #define EM_CYGNUS_MEP		0xF00D  /* Toshiba MeP */
 
-#define EM_MOXIE                0xFEED  /* Moxie */
+/* Old, unofficial value for Moxie.  */
+#define EM_MOXIE_OLD            0xFEED
 
 /* Old Sunplus S+core7 backend magic number. Written in the absence of an ABI.  */
 #define EM_SCORE_OLD            95
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/md5.sum ./md5.sum
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.8.50.20150109/md5.sum	2015-01-09 01:53:57.000000000 +0000
+++ ./md5.sum	2015-01-10 01:51:23.000000000 +0000
@@ -1,4 +1,4 @@
-f65d02b73a4149c4c4ef7c955e744408  bfd/tekhex.c
+ec0a5972f6858c7125f5748457c3d0eb  bfd/tekhex.c
 f624b63828c11f9bb09466cbc385b56c  bfd/reloc.c
 daed7fcc65e437bc77ebf152e0d7231e  bfd/dwarf2.c
 610d1cd3cbbed99e073207b0b24af114  bfd/libbfd.h
@@ -38,7 +38,7 @@ f74f5720bf485dc971d7b4151b97318b  bfd/pe
 d714ee957aefa81619f03058d91b23cb  bfd/elfcore.h
 c81d65148831d8cdd82361f4e75ad0c2  bfd/elf64-mips.c
 57287cb3abe2dc7f66af4ab28aafebe9  bfd/cpu-m9s12x.c
-02bdd47cd779dc6c3fa48d7ebab3d03a  bfd/version.h
+665c4f23d5d87b6ec58d8220858312c0  bfd/version.h
 a107ac2f34a58b7629fbff59490f61f1  bfd/cpu-tilegx.c
 ceebc66a221f8f9297b660d643de9009  bfd/coff-mcore.c
 b33e0ba78cdd46c771e365ab8b48bfc1  bfd/cpu-avr.c
@@ -150,7 +150,7 @@ b096261204aa83b0027e9886b983e23a  bfd/ca
 63fe47ec508c643232e768ca5edf4f3c  bfd/cpu-spu.c
 35f7bce12dc045c5df6ed1cbccc0cf49  bfd/bout.c
 effd5b05c0a39ffb18063e98f219ed6f  bfd/warning.m4
-5694696fb49e099f3d5979ac5b2b2398  bfd/elf32-moxie.c
+91d7723dbb1ac2d0d4b73e009c30860a  bfd/elf32-moxie.c
 d257d07aae981ced6ca5490db04c189e  bfd/pc532-mach.c
 f210b04663c7d0f71e6559a3f7a7e1bc  bfd/configure.host
 62003f2b3a96e1a7c53fe2e85f685db5  bfd/cpu-aarch64.c
@@ -431,7 +431,7 @@ fd30f5988bcb1ac96b9cce47b1ab5469  bfd/el
 7b89e415f08d597d888efc2c3dded43c  bfd/elfxx-ia64.h
 5d6400b5358d7e0ac9d4a67eb20c20aa  bfd/elf32-or1k.c
 cf1a0b18fa9480d842f34e55bb2749f4  bfd/targets.c
-9cce83e61ff198bdcaea92cf2d641226  bfd/ChangeLog
+65a6aa589b6a9cf6cfa29c2afb535e73  bfd/ChangeLog
 f8ab1d36a2214606a4c8b223824d7e67  bfd/section.c
 03a3e8bbf7ffcbbed93d51fd38587804  bfd/elf-s390-common.c
 3b45f6190ac856f0e04c77018c6bc28b  bfd/elf32-lm32.c
@@ -888,7 +888,7 @@ a8325de9c6473c15722e1cfdb6d2ba24  gdb/co
 66e64d38d64c18c47e8605b6267e09b5  gdb/tramp-frame.h
 ddbd14b96c4b153eba02ccadf4ed9807  gdb/gdb-demangle.h
 f20f59d9e6fa60e85eb9a2d727e3e316  gdb/ravenscar-thread.c
-e1fc6ede3367880d068c36c890b30a57  gdb/Makefile.in
+ac8ee0ecbd0e05bda3d513127366b748  gdb/Makefile.in
 e28da424ccb6965d0ba6955035a6b04b  gdb/btrace.h
 aaa0a2d54605b37838cf54ced8baa29e  gdb/windows-nat.h
 f64c228a59ac9322bf93cf5a805339cc  gdb/sparc64-linux-tdep.c
@@ -1019,19 +1019,19 @@ c71f8b82e80dd51ca3063c99f5367a04  gdb/sh
 dea983db4ff36484af6ddcfd3edfe228  gdb/go32-nat.c
 96db5f3d2056d4a3a6acfbe480ce5077  gdb/ppcfbsd-nat.c
 fd89864cd40e82e38159fe3ad6045b21  gdb/inline-frame.h
-04eeb72381e7b5d5e535e174b9e71ccc  gdb/nat/linux-ptrace.h
+87e62d8e44ed7100fe7943a91806179d  gdb/nat/linux-ptrace.h
 0936bceea98a1254eabe4428b52495fb  gdb/nat/linux-waitpid.h
-20a0e753ac4a2a95170199729e166be7  gdb/nat/linux-ptrace.c
+2740410d5f15ee52ae7e6e59e91c3b81  gdb/nat/linux-ptrace.c
 35dea2eaca77dfeb3b2512c366ed065f  gdb/nat/gdb_thread_db.h
 4388ea55be0c9f2b4102d22089fd9d87  gdb/nat/linux-osdata.h
 d60a54fbdfa129e9bca6a9f893d16563  gdb/nat/mips-linux-watch.c
 8fecfdb6ca2b3f42838a7ffb794dbd71  gdb/nat/x86-cpuid.h
 87e5eaf54ba07d737f883ba396a5ccf8  gdb/nat/linux-osdata.c
-b3969f3bb6f4c86b327605d097b1c435  gdb/nat/linux-procfs.h
+8a7c49ccb6c2ad9eff13f353be0a7801  gdb/nat/linux-procfs.h
 3fe5aad707b22a94b6dd384ab77fd7b6  gdb/nat/linux-nat.h
 5fa3b003ca5aa9fe60d784e71c72e6f2  gdb/nat/linux-btrace.c
 669b39680313d2b003d1478b9f530a5e  gdb/nat/x86-dregs.h
-b90071e45e0719cf5cce981dff77af5d  gdb/nat/linux-procfs.c
+eb76737a6846a756bdddceb587ae5b00  gdb/nat/linux-procfs.c
 7c634adb1aa24083300683122bd42808  gdb/nat/x86-gcc-cpuid.h
 4b84e5a576abd405b38fc5ef3998ee9a  gdb/nat/mips-linux-watch.h
 adae21661830cc755ff5274534e762d4  gdb/nat/glibc_thread_db.h
@@ -1063,7 +1063,7 @@ e34721ebe6f9aa0def67750d0648775a  gdb/in
 1b374a8198c2d7fd6dbfdf2f5b43d1ed  gdb/mips-sde-tdep.c
 3e2614670486b95024e13a51aeb3a62d  gdb/gdb-dlfcn.h
 158f4a37725e844c44e17951e0b4abb6  gdb/ser-unix.h
-3ee32ae6b808066b04dc2206f7e9f6a2  gdb/utils.c
+20e2e56c92567d03563d963c658607c5  gdb/utils.c
 3e90d5e4fd589a95ee4d7d2efbc70626  gdb/microblaze-rom.c
 90e56dea65beb67443d6c83cbc5fed7f  gdb/ChangeLog-1997
 6ddec7f5a989e30a032930279fe6f5fa  gdb/trad-frame.h
@@ -1204,7 +1204,7 @@ e51e65533784e4ee758c5ab84f66ac2d  gdb/mi
 04777c319ea7293bbc87f392ab975245  gdb/sparc64fbsd-nat.c
 eac48212762d2e0c56b5215e4bc7888a  gdb/dink32-rom.c
 e4e2a84967656167ffc48faf8422b441  gdb/s390-linux-nat.c
-e9f6885e3d534632c7df0d29cde08e8c  gdb/linux-nat.h
+77c2f603033342ad87a2d4ae3592cefe  gdb/linux-nat.h
 13f56b0f27cf5dc63c9778726b1e9bd1  gdb/sh-linux-tdep.c
 9bcc332d5e29d380a6791f58bedb9961  gdb/go-exp.y
 2ad145eee71eec67470ebfefd4ed1e99  gdb/i386gnu-tdep.c
@@ -1226,7 +1226,7 @@ c62396471ac0e41b5b86b9f918c070b3  gdb/so
 65d4d83424f90b61300aecad3a789d29  gdb/ppc-tdep.h
 08d61feeff6935f601f0174fff2f75e0  gdb/configure.host
 a3538b99c15297deda03355f4e4e7ad5  gdb/x86-nat.h
-36cacc4f52ebddcca732eb010eb8828f  gdb/linux-thread-db.c
+d79f3e87bca0ee0dc08dc3c397bf2abe  gdb/linux-thread-db.c
 7fe38f8c53bba1046e5d57e3aba23aea  gdb/c-exp.c
 5eb62e34c5152327fdb1068166605cce  gdb/alpha-linux-nat.c
 bba1a8de5801c830182eaa2c3070a9e0  gdb/sparcnbsd-tdep.c
@@ -1298,7 +1298,7 @@ b01d36d2ae67a4f9727a83f8f6936252  gdb/tu
 bd09c5481e9864eb233019724db56d2d  gdb/tui/tui-disasm.h
 10271d6a68a2c707a920c8c7b8286a5c  gdb/tui/tui-command.c
 4358ae61fcf053d4985cdf7d688973af  gdb/tui/tui-hooks.h
-8fa550a2a6db7ca76a0c24bd77f01cea  gdb/tui/tui-hooks.c
+d9d3e09551367796dce2a17fa0a83c00  gdb/tui/tui-hooks.c
 3ca18e956512fc1fc2d593eb92b16ea7  gdb/tui/tui.c
 9e2ac972187285592aa82c4fd045f840  gdb/tui/tui-disasm.c
 982017c72295a921a15aa81ff4c41c39  gdb/tui/tui-io.h
@@ -1306,7 +1306,7 @@ a59256f94107464eb22244ac56488cd5  gdb/tu
 42572372e7df4a951513c1622b91b940  gdb/tui/tui-command.h
 a4b16b750f957df7f0461af20baf3d57  gdb/tui/tui-stack.c
 ed2f4d8bf00841dd3df0afa69b445ce1  gdb/tui/tui-source.c
-8f309e928a3ff520bacfde3d2c9fad6b  gdb/tui/tui-io.c
+dab413be4329497525ecacf8d35a440b  gdb/tui/tui-io.c
 fbbdfe573b16a441c411cf79414d622c  gdb/tui/tui-layout.c
 d09de30673257a10d67adb2dc9b1824b  gdb/tui/tui-wingeneral.h
 b2ece8b901b20b1679c2d8ed4c36e58a  gdb/tui/tui-interp.c
@@ -1925,7 +1925,7 @@ eef0f7a02e7d23d2f28ad5df04a3a496  gdb/te
 8367467101801b6e118a3af528601691  gdb/testsuite/gdb.python/py-events.py
 425335bc085dce42b810a1b99336a996  gdb/testsuite/gdb.python/py-frame-args.c
 0408fed72b1aeddb53112fe4054b2b68  gdb/testsuite/gdb.python/py-events-shlib.c
-be549b13417a462460885f66120df8ea  gdb/testsuite/gdb.python/py-prompt.exp
+708bcfa24f8ff78c7c01acd4bd8372db  gdb/testsuite/gdb.python/py-prompt.exp
 2db47e6d29838ffc8b96dabce27fef00  gdb/testsuite/gdb.python/source1
 cee52a94f909d092154f9fcaa9fcb764  gdb/testsuite/gdb.python/py-linetable.c
 7dde992c265a9bf984ef08f06c3b0f11  gdb/testsuite/gdb.python/py-finish-breakpoint2.py
@@ -1945,7 +1945,7 @@ bd2f25fb8a86f0cc961b6e45131c168b  gdb/te
 b3402057c9f2e46816c282c0434c10a3  gdb/testsuite/gdb.python/py-caller-is.exp
 9f5a91b3054e2af87741da27a080844a  gdb/testsuite/gdb.python/py-frame-inline.c
 e5a206de37ef8026ab797c23e2b53edc  gdb/testsuite/gdb.python/py-linetable.S
-1144e230bfbf7717a9803b38c631547a  gdb/testsuite/gdb.python/py-sync-interp.exp
+15973ce51947517b97f39ea42dd7b110  gdb/testsuite/gdb.python/py-sync-interp.exp
 768c798fb7819daee5754680c7b1e944  gdb/testsuite/gdb.python/py-evthreads.exp
 48a65209a5086957c0f52150ad0560f0  gdb/testsuite/gdb.python/py-objfile-script.exp
 0c1c0866ec7affdd6aee5020bd1cd872  gdb/testsuite/gdb.python/py-section-script.py
@@ -1987,7 +1987,7 @@ d3bddc2e95b60f704388ad86574d96aa  gdb/te
 b1ed7f10b28b5a992ca7d87982ec2dcd  gdb/testsuite/gdb.server/wrapper.c
 021862ee5b8e5bf10116a791cf2ed5ab  gdb/testsuite/gdb.server/server-run.exp
 76ffbd3ac9b97abfb51aba5445492df8  gdb/testsuite/gdb.server/no-thread-db.c
-74f942f3e367d30ec698ccbb1d416281  gdb/testsuite/gdb.server/ext-attach.exp
+bf29ba48c72724b27aa5b4dbf27d532a  gdb/testsuite/gdb.server/ext-attach.exp
 a2d3851bfec03af9050ad0266bf423bb  gdb/testsuite/gdb.server/solib-list-lib.c
 ef5fd759550d3a7fd636c536e0ddf446  gdb/testsuite/gdb.server/no-thread-db.exp
 0199765c5ae23bcbeb8b1b92d407d262  gdb/testsuite/gdb.server/ext-attach.c
@@ -2054,7 +2054,7 @@ d5afa0fe202b332d610307c57010db02  gdb/te
 bb711ce97cf00cad9c9bce68090c3007  gdb/testsuite/gdb.base/break-main-file-remove-fail.exp
 30cc0608148bbc9e20afc76fd79b94f0  gdb/testsuite/gdb.base/filesym.c
 10b4362a0ae6374332df3c03fdf050e3  gdb/testsuite/gdb.base/vla-sideeffect.exp
-16b3069b963792b7436b7915b77ab4db  gdb/testsuite/gdb.base/watch_thread_num.c
+e2bfb40807919cf1e40d05f583f2f1b2  gdb/testsuite/gdb.base/watch_thread_num.c
 242f950aac3d00b864f482313086acb4  gdb/testsuite/gdb.base/hbreak.c
 9d5c51006bb7e037060fcf47b0a25326  gdb/testsuite/gdb.base/callfuncs.c
 403544dac2e0023e75c1b2befd62f32d  gdb/testsuite/gdb.base/consecutive-step-over.exp
@@ -2421,7 +2421,7 @@ d25dbcbf9459795e5b55c4ee13b86c4c  gdb/te
 e793a168dd067288a1c92e0f5a8115e1  gdb/testsuite/gdb.base/unloadshr.c
 c7fcb4a37468c23cb2392c4d1d2f6ce7  gdb/testsuite/gdb.base/valgrind-infcall.c
 cdf539fb37aa019503f1ccbc0b4389aa  gdb/testsuite/gdb.base/watchpoint-cond-gone.c
-6a5ddbedad21b1132957f5f4e57d0ecf  gdb/testsuite/gdb.base/watch_thread_num.exp
+23a7e905282303e7af2156be3cedfceb  gdb/testsuite/gdb.base/watch_thread_num.exp
 561c27528d8cbdd1dd228d02379c14fc  gdb/testsuite/gdb.base/solib-display-main.c
 24f8dd7a0f899efaa81bf248f8eafa2e  gdb/testsuite/gdb.base/fortran-sym-case.c
 9cd4ef136dfbee149a4056477283fa41  gdb/testsuite/gdb.base/grbx.c
@@ -2541,7 +2541,7 @@ ddb3066e750df3995ee4780e8ba2c4a4  gdb/te
 f83afce63a3cb2cd060a69b94990a317  gdb/testsuite/gdb.base/symtab-search-order-1.c
 a5b5c68530a573520b8b8a086855bf0d  gdb/testsuite/gdb.base/longjmp.exp
 49cded18d4b376bc7480172708e12de4  gdb/testsuite/gdb.base/call-signal-resume.exp
-453e79d3144d0a63854dfe8003262f49  gdb/testsuite/gdb.base/solib-overlap.exp
+6f21f303842683712a1ec3e9dd01ca7d  gdb/testsuite/gdb.base/solib-overlap.exp
 b263e085b920ccae2568157fcc33189f  gdb/testsuite/gdb.base/psymtab1.c
 eb8f3bcbfbf6780085ec1dea2fbbbb43  gdb/testsuite/gdb.base/global-var-nested-by-dso.exp
 bd5ca176289756c8a8f6a3a56c2407ac  gdb/testsuite/gdb.base/fullpath-expand.c
@@ -2683,7 +2683,7 @@ dccdc97b49250422c960e8c559ac883c  gdb/te
 828a7454e3f8eddd3ef9444b31477cb1  gdb/testsuite/gdb.base/consecutive.exp
 254c0d02398b856e3b59222454614b84  gdb/testsuite/gdb.base/symbol-without-target_section.exp
 536354dc2d522529e2c8cbeebdae23aa  gdb/testsuite/gdb.base/skip.exp
-c2f8eb654127fee4f7def3122bc6439c  gdb/testsuite/gdb.base/annota1.exp
+c88288d70c305dcf6100643e08826ac8  gdb/testsuite/gdb.base/annota1.exp
 d7dd5de96d7762b8c08b55b9a5d660ec  gdb/testsuite/gdb.base/dcache-line-read-error.c
 4ab5e22b7ed15121561c6aa3d4988de6  gdb/testsuite/gdb.base/cond-expr.exp
 d227cd5acdb0fca7bc3bc43b226fcf96  gdb/testsuite/gdb.base/pi.txt
@@ -2724,7 +2724,7 @@ b6891ca09e7713f057a130aeb9c0514b  gdb/te
 4a1dab3ee837d16ce8c64928779ae7fe  gdb/testsuite/gdb.base/sss-bp-on-user-bp-2.exp
 185ab1515aff77f0745f472b81de6780  gdb/testsuite/gdb.base/foll-exec.c
 0f8de89d2d90eccf83df98f8bb09ffab  gdb/testsuite/gdb.base/catch-signal-fork.c
-20615bb4cc0936ff298e9aa34bb2f0aa  gdb/testsuite/gdb.base/attach.exp
+e2aee72889a4bcc67d4690a4a9ef68b9  gdb/testsuite/gdb.base/attach.exp
 ccd0c6fcbb4f174f84ad76783660e6ba  gdb/testsuite/gdb.base/sss-bp-on-user-bp-2.c
 875a150f7fd4db096ea08b9acd105dae  gdb/testsuite/gdb.base/baz.c
 d402ea8c08866d797062e2a0006333d8  gdb/testsuite/gdb.base/comprdebug.exp
@@ -2798,7 +2798,7 @@ d9fed877f7668556b8dea9ad3b1dd43d  gdb/te
 3366ec3534381bd9ca56355ab6a5ad0e  gdb/testsuite/gdb.multi/watchpoint-multi.exp
 102946043661ffdd5098372b92d1f09b  gdb/testsuite/gdb.multi/base.exp
 3b323116a441bb7781f1199c7f315869  gdb/testsuite/gdb.multi/multi-attach.c
-9cdf414c33f26050f181b91e529dd0dc  gdb/testsuite/gdb.multi/multi-attach.exp
+df51ceccba157af7e5291e6cabd30cc6  gdb/testsuite/gdb.multi/multi-attach.exp
 a678541a68147b25bf4358c1946e5675  gdb/testsuite/gdb.multi/crashme.c
 52d6dac89b8cdf43d237bd4bc480342b  gdb/testsuite/gdb.multi/hangout.c
 1c4ed58aff043c07e96d1f43b3688656  gdb/testsuite/gdb.multi/watchpoint-multi.c
@@ -3376,7 +3376,7 @@ ba63400ae4571e7f4d0aeb59000c2fee  gdb/te
 fdd1b0ea9cb454d308f3efee2756042d  gdb/testsuite/lib/prelink-support.exp
 4377817504481edf59814f0c53fc7398  gdb/testsuite/lib/opencl.exp
 8b095d6d185b258c160d765659927692  gdb/testsuite/lib/perftest.exp
-7854d438b40a32ab12044181a3c8bc98  gdb/testsuite/lib/gdb.exp
+007c73505de52d4a33bfce96623ba4b5  gdb/testsuite/lib/gdb.exp
 58b04b7bc347cc9d1b4474da7a2ac1d0  gdb/testsuite/lib/compiler.cc
 c3d2b933fd6eca1da5c3707b6d13bb9b  gdb/testsuite/lib/opencl_hostapp.c
 2d73515d4ee5352309d3f8f3f5ffb2da  gdb/testsuite/lib/append_gdb_boards_dir.exp
@@ -3480,7 +3480,7 @@ a2d113a7f444b497b4564e0ee9ddc899  gdb/te
 a225f3bdf3ee20da9623fd4c54b5454b  gdb/testsuite/aclocal.m4
 fda53dda096c181aeed6c78de55f455a  gdb/testsuite/gdb.threads/clone-new-thread-event.exp
 74fe8139d67c0c776a4a28460b473f30  gdb/testsuite/gdb.threads/tls-var.exp
-480563499463f7eb4b7ecd7664a36def  gdb/testsuite/gdb.threads/siginfo-threads.c
+19562238a9f887dbc7bc5b534b90ced2  gdb/testsuite/gdb.threads/siginfo-threads.c
 3f9f6f799fb3bd445b3a3ba2f3621021  gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp
 8fc9d226571b25b6807ca9f0b9f46455  gdb/testsuite/gdb.threads/watchpoint-fork-st.c
 c6241caae68157d8edd17288b4b25156  gdb/testsuite/gdb.threads/threxit-hop-specific.c
@@ -3491,9 +3491,11 @@ c6241caae68157d8edd17288b4b25156  gdb/te
 8486b733542a73f24e8ecddcfa4a9bf8  gdb/testsuite/gdb.threads/stepi-random-signal.exp
 67a11520296f385616e94bfff3851dfa  gdb/testsuite/gdb.threads/tls-nodebug.exp
 d46991f7406f74004ef188b9caaa0113  gdb/testsuite/gdb.threads/queue-signal.exp
+3c8510aa38a22fd0fb6ff49b9ec75b02  gdb/testsuite/gdb.threads/attach-many-short-lived-threads.c
 b2eaf16c97d1360be5630e67364c8ac0  gdb/testsuite/gdb.threads/staticthreads.c
 a3a14e5e913c43611a5ed10ad8f90528  gdb/testsuite/gdb.threads/thread-specific-bp.c
 d46d60fe6d689d0ff3f1d48b7490afb1  gdb/testsuite/gdb.threads/corethreads.c
+c86c7d7e9133e42ea0d6191726e6da75  gdb/testsuite/gdb.threads/non-stop-fair-events.exp
 6f617dd7e9d0114008d484b807926b8d  gdb/testsuite/gdb.threads/watchthreads.c
 eda32e6af468f5a44b33928ca7e418fc  gdb/testsuite/gdb.threads/execl1.c
 f20781676b5b0e91bdc15071d15f529e  gdb/testsuite/gdb.threads/thread-unwindonsignal.exp
@@ -3513,6 +3515,7 @@ aa61e41da21e07191a4ea22e45396c02  gdb/te
 1a377fe717b916723bc3b8f3af1a708e  gdb/testsuite/gdb.threads/info-threads-cur-sal.exp
 cf739afbfbbf18f65edb576a412e20f8  gdb/testsuite/gdb.threads/switch-threads.exp
 233baea9789647aa0314dd83f29fc4c6  gdb/testsuite/gdb.threads/attach-into-signal.exp
+527b6819d4005ef4ac0eecce2030ce53  gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp
 ed56e55fc1218e14a8b9c9adb13d0b78  gdb/testsuite/gdb.threads/interrupted-hand-call.exp
 bae9739e5243f71d3ad8444d5a199bac  gdb/testsuite/gdb.threads/pthreads.exp
 7999a0b25dd7c6cc86cf3c1d50b8398c  gdb/testsuite/gdb.threads/watchpoint-fork-parent.c
@@ -3523,7 +3526,7 @@ be913d5ceda9cb28c9c76842a52cf02c  gdb/te
 bda4c60182ddbab25fff0a82761972a6  gdb/testsuite/gdb.threads/watchpoint-fork.exp
 28a761d26bddc7f8d45723ac032630eb  gdb/testsuite/gdb.threads/fork-child-threads.c
 69eea83dad95e8105bf63685711612bb  gdb/testsuite/gdb.threads/tls.exp
-57f7d3ce706f259c003359849c62686b  gdb/testsuite/gdb.threads/ia64-sigill.c
+7d7261d44fa85315449560ee5d3a49f9  gdb/testsuite/gdb.threads/ia64-sigill.c
 99eb146d49bafde510cb7423923e7cd0  gdb/testsuite/gdb.threads/bp_in_thread.c
 fa0b11ae2e271abc145f611cd61bee4c  gdb/testsuite/gdb.threads/thread-find.exp
 81664099c0057d8f2c95009566b0c365  gdb/testsuite/gdb.threads/siginfo-threads.exp
@@ -3541,6 +3544,7 @@ f5dcbc6cdd83881b4cb682363306310a  gdb/te
 1dfd13e46a27fba6aa9543a56bfb917d  gdb/testsuite/gdb.threads/queue-signal.c
 fdb58df3ff3b8a2a1ee05c9899b67b6e  gdb/testsuite/gdb.threads/fork-child-threads.exp
 a9a5fd23056437d34432f5463d98d27e  gdb/testsuite/gdb.threads/break-while-running.exp
+9d999a002cd39659ac56da5e88432f71  gdb/testsuite/gdb.threads/non-stop-fair-events.c
 c90abfcfc3bf23bc1fd1bdae49705979  gdb/testsuite/gdb.threads/pthread_cond_wait.c
 34668a4dd3f8f62bc9317c4c33d6a722  gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp
 0346865c86acdd457644635f0456bca1  gdb/testsuite/gdb.threads/current-lwp-dead.exp
@@ -3562,7 +3566,7 @@ e2122a01fbe4609d4c440777f53c4df1  gdb/te
 0ef1bee3f201385a41bdfea712ffa5c6  gdb/testsuite/gdb.threads/thread-specific-bp.exp
 20fb89ef3d79442a74ce3c80f8b4e2a8  gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.c
 f1c529ba70eb642b2189491e452f006d  gdb/testsuite/gdb.threads/non-ldr-exc-4.exp
-e43cc5c2afe03779df49c612f3ebdc98  gdb/testsuite/gdb.threads/watchthreads-reorder.c
+ce18e8166dae762b40ba4b6f9bb7c113  gdb/testsuite/gdb.threads/watchthreads-reorder.c
 2a1e20533170ef3947039a86fafbadd6  gdb/testsuite/gdb.threads/tls-var.c
 001ff3292c9cab0d7bbd13b409fbf61d  gdb/testsuite/gdb.threads/schedlock.exp
 1e1c65f08ff2e2e7d5ba95e2788d4250  gdb/testsuite/gdb.threads/pthreads.c
@@ -3573,10 +3577,10 @@ dcb628a4929aa9d6c58c06f70951b349  gdb/te
 9ac04cf29f19bc362dabc1ae289291cf  gdb/testsuite/gdb.threads/thread_check.exp
 bf90cd3d89504b70c51727570eabc2ae  gdb/testsuite/gdb.threads/watchthreads2.exp
 34d7357618b291ddbf72c725eb1af0c6  gdb/testsuite/gdb.threads/kill.c
-3b223abaa10468ccc6826fba6cc6484a  gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.c
+abcb223a22e788a09e29542e63f4f27a  gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.c
 6e73f8a5593a9b8d7bcfedf9148f7447  gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp
 b58d0f333f8e1c21a851ec19bf5997cd  gdb/testsuite/gdb.threads/switch-threads.c
-fc2f7f9ed575c6e0508555e7de8efb2a  gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp
+a60d2516f9d50f6faf0a50a0a8b5ad0a  gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp
 d2aa0b4de628920e4d2d101e261f279d  gdb/testsuite/gdb.threads/sigstep-threads.exp
 328974bdd68396621905ad8c78050f8e  gdb/testsuite/gdb.threads/execl.exp
 ffcda95656fdd12238faf6a32570d9ca  gdb/testsuite/gdb.threads/thread-execl.c
@@ -3602,7 +3606,7 @@ f47660fb50e45ac82dfde96c8b208d53  gdb/te
 bbb0aac24b06f2fb7b477d646d96b85e  gdb/testsuite/gdb.threads/watchthreads-reorder.exp
 7b036c4f18c35accb2c94363c820ed9d  gdb/testsuite/gdb.threads/tls2.c
 b93e03963bd612e4b592e67036888814  gdb/testsuite/gdb.threads/fork-thread-pending.c
-6221765f6b0cdd0bb831c1d79da3ca59  gdb/testsuite/gdb.threads/fork-thread-pending.exp
+3e3f9f2e059e51e1eda9ff8364711283  gdb/testsuite/gdb.threads/fork-thread-pending.exp
 cfeb5e6bf2b563d3b141ee8e9b0f2d52  gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp
 53568d503835ed659ccf1bf48399006f  gdb/testsuite/gdb.threads/thread-specific.c
 e39a7a0e944ae44c5ebfd13aab4ab79c  gdb/testsuite/gdb.threads/bp_in_thread.exp
@@ -3646,7 +3650,7 @@ b047847a5183b4462b5b135cfd964543  gdb/te
 4127afeb79b2a2bff6c65f128ebd5969  gdb/testsuite/gdb.go/integers.exp
 ea5ff936bcbd68cbc91cb8771230db91  gdb/testsuite/gdb.go/strings.go
 81b7ed6cb92c627d245bd2efc4b953b9  gdb/testsuite/gdb.go/methods.go
-0696a9e6de2650251634ad1cebb864d3  gdb/testsuite/ChangeLog
+0e31e56532dd6346477a19301f814408  gdb/testsuite/ChangeLog
 b3f11b21e5921c419a43f93720dedf85  gdb/testsuite/gdb.asm/empty.inc
 37858e142701cb0c2b792e4f739ee3eb  gdb/testsuite/gdb.asm/asm-source.exp
 f1621bbbb2acbec5adef86d7d9549975  gdb/testsuite/gdb.asm/bfin.inc
@@ -4283,43 +4287,43 @@ f5615bbb876f5d6b8ff495ea635f223d  gdb/f-
 e88f32d160934e36fa7d803d483a1e2e  gdb/gdb_curses.h
 1bbdb3e7ea9ca53f9a8cf1a548dca9f5  gdb/jv-valprint.c
 8108dd8f906f2654fecc74958cf383db  gdb/doc/psrc.sed
-a010658b90fa7d81581f507d5db34249  gdb/doc/gdb.info-3
-a3db269702c6699dad5920176de2cf14  gdb/doc/gdb.info-4
+f98b35273d07e3ad35bbe818579a7fc3  gdb/doc/gdb.info-3
+5d4d0f1ad891e8f1956ceeca388ac6e6  gdb/doc/gdb.info-4
 ab0fe311032294b952da80585b8b90e7  gdb/doc/fdl.texi
 be5469929c58735017a3a1e083554ac7  gdb/doc/Makefile.in
-31abea7622643bd5c7c3ec670bfc4e77  gdb/doc/gdb.info-7
+0fc4b549f7186538a2a69bf01e625f61  gdb/doc/gdb.info-7
 65ee16c0a68d8954d5892092576beb66  gdb/doc/observer.texi
-4d3943c405cfd953e8f699fefc241725  gdb/doc/gdbserver.1
+2ab3044def6d84881e42ec2947f2f4c5  gdb/doc/gdbserver.1
 669fb3191fafb1ca7da855243682fe4e  gdb/doc/guile.texi
 f81a0e00e0cb9e41b078069fb9bedb07  gdb/doc/stack_frame.txt
 ab34a4a36fd27cddd3c7838273cfb1dd  gdb/doc/stabs.info
-900d49ff7ab6aa2d89aa0e33c5401c01  gdb/doc/gdb.info-5
-009f7ddaced7fb07c4063afd45b4dd1e  gdb/doc/gdb.info-8
+90ce51d4f60e1bcb15893e858497b5d1  gdb/doc/gdb.info-5
+cf8a13af8a01442f481a29dc5f135cd2  gdb/doc/gdb.info-8
 4fb6b0bb12bb47f2079a5e38f7dcdcf7  gdb/doc/agentexpr.texi
-1fc46b55b726de81189d129c0f4a5c7f  gdb/doc/gdb.info-1
+a06a42a702f9eff8fff16962c4ab6397  gdb/doc/gdb.info-1
 d5d06eaf9b4d44aa442a4a281aa9aea4  gdb/doc/a4rc.sed
-ba8d57f3ed14c4f6cd97276b27be558a  gdb/doc/gdb.info-6
+7dbebb285309aaab2c1da9b101035d12  gdb/doc/gdb.info-6
 97e3b509a1fe2c492364fd51c648c813  gdb/doc/gdb.texinfo
 553b7fe1bf4b5d8b96fdb8cd83503de1  gdb/doc/stack_frame.svg
 04c82b1da7e894a6555868e4f86225af  gdb/doc/filter-for-doxygen
 938187ce9976cbeb134b49335770152c  gdb/doc/Doxyfile-gdb-api.in
 f828e05ce4faab3d297f32d540f77c99  gdb/doc/annotate.info
-f270d3809616140708f16d9a7e312023  gdb/doc/gdb.info-2
+2e0b1bc3243738e2a0236cdeba517f0b  gdb/doc/gdb.info-2
 df443225fa3e5719ca7e6925a7e633e0  gdb/doc/refcard.tex
 6076d300a46651562d4ecd0604442414  gdb/doc/stack_frame.png
-f09651eb1ed2abc32948168da2571554  gdb/doc/gdb.info
+ba5d122a71eb2a72a53cb8b5d7aa8397  gdb/doc/gdb.info
 51f928aef51288aa002575df7e06ff0d  gdb/doc/python.texi
 fa1abec9272120122bf7638320e90d4c  gdb/doc/stabs.texinfo
 62019f8cd981f725b6748f02be1bc2c3  gdb/doc/ChangeLog
-4873c242647f367536960acc461e1512  gdb/doc/gdb.1
-7a99a9b578f8276f633450a41006f8e7  gdb/doc/gcore.1
+79416682f56280c4397b8b34aff656b4  gdb/doc/gdb.1
+4ba21da9df867453336a8503c4a230fc  gdb/doc/gcore.1
 d39233c86ed6a6dc9e853ae6a11fe03e  gdb/doc/stack_frame.pdf
 2daa53916456ce35b6806c2883623b89  gdb/doc/Doxyfile-base.in
 7e8f20fd3b739803f4bd3991d35a4a1f  gdb/doc/all-cfg.texi
 bf96494e6e4d346175babd5ef9781882  gdb/doc/gpl.texi
 cd5e3faa9bd1b684a73c7d527cdb4988  gdb/doc/filter-params.pl
 7bfdb0765c5d050d204fbb30aeeba0d8  gdb/doc/stack_frame.eps
-d156696b9d1b24db6d85c86f438066e7  gdb/doc/gdbinit.5
+4e5264a4d7dcb19da549649feaf2aa2e  gdb/doc/gdbinit.5
 d606e873666ae0bc7bc7c84d6c9c2332  gdb/doc/Doxyfile-gdb-xref.in
 705bf0b3fb65b3f7e3db4cc5d9ae8eba  gdb/doc/annotate.texinfo
 79278fc2f5486809779a9a8f8883d401  gdb/doc/doxy-index.in
@@ -4698,7 +4702,7 @@ a042a48e50b3d554487841a49b7bc555  gdb/in
 bcd0841ee006d202302f24f86c36b5ed  gdb/solib-target.c
 a667d6f75f8b3a39dc37cedfcab2572d  gdb/tilegx-tdep.c
 39ea2c70489bb412e91c1139c460c77e  gdb/c-lang.h
-ba353aaea13befefa3a862baa8182983  gdb/breakpoint.c
+2970e41fc0b9036e25b2d9f46a497cd9  gdb/breakpoint.c
 a5375552c201d6283297ee5ceee2d29c  gdb/block.h
 e4270f829487caf7e0363d59fe648aa1  gdb/ax-gdb.c
 9973ba0ba493c10c7af5b0747cc555ac  gdb/prologue-value.h
@@ -4781,7 +4785,7 @@ e5c081bec329720b4c0d37fb1bf8adae  gdb/p-
 f1679b5d9950d66febb8259748700963  gdb/std-regs.c
 9da9e540b1c6970695a3161272737803  gdb/go-lang.h
 23e51b25e50614cfba06a52e405e2243  gdb/i386-windows-nat.c
-0480066b293ada148b0a81dce9c953c4  gdb/po/gdb.pot
+a34238b954dfe5363e58a11c39790c13  gdb/po/gdb.pot
 1851bff0653201a488dcae18dde7efad  gdb/po/gdbtext
 8a1de3f60e39741f918cc93c69d9fe76  gdb/ada-lang.c
 5e0c6b053fd9575dde3084e69835d9c3  gdb/dcache.h
@@ -4807,7 +4811,7 @@ b21eb0affa9c0fa159d8dc3a1483410e  gdb/jv
 32bb803ab1e68860f1402dbe7e2cb0f5  gdb/nbsd-nat.h
 83df4734061e07b644f77632819578cf  gdb/mipsread.c
 f5c872d4805a7ac039b4dfc840f4bb8a  gdb/amd64-darwin-tdep.c
-3f652da75e5a8af22ec617256e98379b  gdb/ChangeLog
+6b26c2637a4aaf2b3806c07cd926a189  gdb/ChangeLog
 5a1dbe4837b41ee2b9cc7a35e0d20a61  gdb/go-typeprint.c
 c6de4736a691dfc690f55e7b69880511  gdb/score-tdep.c
 5a44fd4377f0804008a3697e72efbfe3  gdb/xml-support.h
@@ -4855,7 +4859,7 @@ afc3c5800376f8693dd411cba7aa5f77  gdb/bu
 108d0bb36107d759fac662685e23e5fc  gdb/m88k-tdep.h
 c8b609c20e1d71a726907777e02e728c  gdb/target-descriptions.h
 26d1d5b29967e68903ae1310be36567f  gdb/corefile.c
-45d63fbffb8282cdfd76ae24ace3883b  gdb/x86-linux-nat.c
+7274e131307bc43a731c80c6a9324d48  gdb/x86-linux-nat.c
 747e62f8cca9b50ef0e4c19e046d23fa  gdb/macrotab.h
 d821f4d086d77a932d6e8a893ac883a6  gdb/progspace.h
 44fa14e15b931dc63422873dc3a5aae1  gdb/regformats/nios2-linux.dat
@@ -5025,8 +5029,8 @@ b0cea923664c3efb97b385d1c2f29f37  gdb/gd
 213c42e9306ef931e62c6658c513df21  gdb/gdbserver/hostio-errno.c
 a8b318ada418e233c4996535f60b132c  gdb/gdbserver/dll.h
 b59c8001ee1dcc7cd60f69b0b264117f  gdb/gdbserver/nto-x86-low.c
-20ee6ae9df3afb25a60398b8a4ad6425  gdb/gdbserver/target.h
-236d4ccab4fcf9c5c2bd90807ff0a796  gdb/gdbserver/linux-low.h
+49ff4809d1e867e3ee28bf7b801fd539  gdb/gdbserver/target.h
+d32caf02d4271e54ecc8fb25dbad9ff7  gdb/gdbserver/linux-low.h
 fd2a628fae668ef78fe489121037c9da  gdb/gdbserver/linux-ia64-low.c
 87906ff2ed562448a80347fb1c3c36db  gdb/gdbserver/configure.srv
 8cd58f9641e3fcbc0585d13a4b4704f5  gdb/gdbserver/linux-arm-low.c
@@ -5035,7 +5039,7 @@ f63179ed369e57afcb2ac34d9197c7ef  gdb/gd
 eaa996efd99c282244af925502b37a58  gdb/gdbserver/event-loop.h
 ceaf88dcc1caaf217a8038914b1ef92c  gdb/gdbserver/ax.h
 e48e5b8a013a7c6db280c340e87aa011  gdb/gdbserver/linux-m68k-low.c
-99ac321e1394fc26558b9db9ba2e6a6c  gdb/gdbserver/mem-break.h
+9f76512eec133928b94edff24575a86e  gdb/gdbserver/mem-break.h
 cdd30823b0fef194dc2aa026633ce27c  gdb/gdbserver/wincecompat.c
 4e78b5fe1cc314a3958bfdf49b6b8c6b  gdb/gdbserver/utils.c
 9b657bb71bee2f5c9bff184f16dfcb61  gdb/gdbserver/win32-low.c
@@ -5044,9 +5048,9 @@ fe81eb6c2c62a0d201997976c23e183e  gdb/gd
 f87acebf2918d9b768ca4c7ac8e926f2  gdb/gdbserver/config.in
 56625f046b1135ad0a2c1d58c86600eb  gdb/gdbserver/configure.ac
 791b58ddf159b59c7d9375e2c2f00a07  gdb/gdbserver/README
-682500b1ed8280f526b4a12d96fb8f18  gdb/gdbserver/mem-break.c
+ac2b6611473c54f627f2fe0cab6e7a9e  gdb/gdbserver/mem-break.c
 cba9f6305efbbdcd68dbc1f3c96cfdec  gdb/gdbserver/linux-mips-low.c
-f82befa6b711a4f2e04925f6591bfc93  gdb/gdbserver/tracepoint.c
+5978211e1858547670c3e2f0dd046e78  gdb/gdbserver/tracepoint.c
 0b926f70628d4332584c50b3a755c4ff  gdb/gdbserver/nto-low.h
 872b80e9ded8aad2a6df089995db53fb  gdb/gdbserver/win32-i386-low.c
 7fed2a00ce72c0ae014199eda5e73525  gdb/gdbserver/linux-nios2-low.c
@@ -5068,7 +5072,7 @@ c443e2d12144a4acd18f0399e07c85ec  gdb/gd
 016dd05060a0b22d580a9cfc641313fa  gdb/gdbserver/remote-utils.c
 37d3082b46ccfe735532c0cef764cbf3  gdb/gdbserver/hostio.h
 47c9750ef3a5a00bf319d98c529a5f95  gdb/gdbserver/notif.h
-d78fa568d357934dcd8a60bce44e5ff5  gdb/gdbserver/linux-x86-low.c
+96b8c24ddd2eccf6f0f7a153af488aaa  gdb/gdbserver/linux-x86-low.c
 44d02f879beb90d030847e4f7bd1bec4  gdb/gdbserver/server.c
 62d1e2f727e137a356f164355bfab955  gdb/gdbserver/dll.c
 dbb86a089c3f5f2096ef6e24d721ffec  gdb/gdbserver/debug.h
@@ -5081,11 +5085,11 @@ e43517c11a200defbe515b283c262320  gdb/gd
 18e5d2afcc8073f657d69be61acb20c5  gdb/gdbserver/notif.c
 15e9f8b9afe707a571ef09a62bbddf35  gdb/gdbserver/linux-cris-low.c
 7f017910fc10864faa3886a248c0de44  gdb/gdbserver/aclocal.m4
-ca21dea4c1d6af6d84bf7304831d2613  gdb/gdbserver/thread-db.c
+2b9f6c6d21c30849559cd27951e51f89  gdb/gdbserver/thread-db.c
 a713e728e699f380772910b1e8911321  gdb/gdbserver/linux-tile-low.c
-ab27ffaf3c0cfce67ea0077b49cf90da  gdb/gdbserver/ChangeLog
+02fa38f9785f0c3084303e23cf358006  gdb/gdbserver/ChangeLog
 bf06506177d8b8accdf07efc010fd1f3  gdb/gdbserver/linux-ppc-low.c
-6e8457454b62670d91765b3c3d645e78  gdb/gdbserver/linux-low.c
+99cebb5fd7ccfe880091d845541081b0  gdb/gdbserver/linux-low.c
 31e072b4e9e5984e19662acc96a07f2e  gdb/gdbserver/proc-service.list
 0541491bd9eded900fc97f8f6dd0ef3f  gdb/gdbserver/linux-s390-low.c
 29f787a14729e764f56e26257e1bb933  gdb/gdbserver/utils.h
@@ -5116,7 +5120,7 @@ ef7f67e5720cf7b193349f8687243947  gdb/st
 8edc014e1b5928dd9761408fa7df0d64  gdb/stubs/sparc-stub.c
 ffc93e69a8813484cec63da022b68375  gdb/stubs/sh-stub.c
 c68917f126137f1f01b8fce213b8bed0  gdb/buildsym.c
-e896a2bb78ffdb09c3d2b5ef75c85ac8  gdb/breakpoint.h
+3d053fa1f3f0ef530bc94d6e7399c026  gdb/breakpoint.h
 df5b61f9fe772c3cb5e1a39d79cceb8f  gdb/objfiles.c
 703bf2a0757f3c8b4a454a0e278aee0e  gdb/debug.c
 9688ad1dae08e48e11479e5199bf97f0  gdb/sol2-tdep.h
@@ -5140,7 +5144,7 @@ c181758754cd0b8d7733fa82d4aaba3a  gdb/go
 06d492ab5c9dbaa82b38193b83bc2e44  gdb/m88kbsd-nat.c
 ca9158e7ede27a090a3228b2965721fb  gdb/glibc-tdep.h
 9ec89fc9f02b1bcf2e0cbf717337c91a  gdb/macroexp.h
-21412d7c6cee0d66f1db6c0bac8828c9  gdb/linux-nat.c
+4e561c5317f6ed3cc9cfc53293100794  gdb/linux-nat.c
 232fae6c14bb330d684a735fbd258bdf  gdb/ppcfbsd-tdep.c
 72c2a6c8c1d784dedb9da73e84229cab  gdb/sh-tdep.h
 fdff848ebe9cb9a3a06617699a60e22f  gdb/top.h
@@ -5317,7 +5321,7 @@ a057e4f64890d51f0ceb872c0065ef86  gdb/gn
 9d709b743313939da551a1890e237d53  gdb/alpha-mdebug-tdep.c
 098806bc336c914a1646ab5f628e9fb6  gdb/symmisc.c
 847a175f0c0ea90ae7e26a8dee6b0de9  gdb/compile/compile-loc2c.c
-8cb134a832ef32d756f5551025fb3602  gdb/compile/compile.c
+17ca583b65f3662faf788167f18c7f8a  gdb/compile/compile.c
 7f386726e3a7d1147912a79ef26f0107  gdb/compile/compile.h
 9e86dab14de5021921910bc306ff4f05  gdb/compile/compile-c-symbols.c
 cdc069d810af4b919cffe24cb8b462e8  gdb/compile/compile-object-run.h
@@ -5635,7 +5639,7 @@ d24561446f32268f77725a4fd01929bf  includ
 d226ff9105af0066acd0f8fce7f049ce  include/elf/lm32.h
 178ae114985d9edeb802d5db40e15362  include/elf/hppa.h
 eadae23950d772cdfb3aa4bca7db6292  include/elf/ppc64.h
-42f1489cf4aa788c92f9773bc4311e00  include/elf/common.h
+a0c00cbba6dd6caf6613a17208984db2  include/elf/common.h
 cb39fcc3b23b529e1c910da2cfe40e9a  include/elf/sh.h
 a1f87acecf0bf30ae7436e076153bc20  include/elf/mmix.h
 bbde24c29533c1f96ee539f18df6d552  include/elf/cris.h
@@ -5681,7 +5685,7 @@ e56febe236eb05ecc039ba2eab2eb03c  includ
 07c88634624f215d47ed7b1a472920f2  include/elf/spu.h
 e6ef0e02808e329abc03c2fd1644d8f9  include/elf/crx.h
 4f59ec98bf65ae537a10835da92a3266  include/elf/frv.h
-7273d8cf3f9a0a8891bd2d9aa00423cc  include/elf/ChangeLog
+6cf16d91679ec16b96e314c3e6ee2be0  include/elf/ChangeLog
 6abfcc8379bd0122c8c79b8934f955b6  include/elf/xstormy16.h
 89c0a896e4cc7eacf2f6c1f3f8524317  include/elf/moxie.h
 c0637a647e68d182e8804f5ca18fd06d  include/elf/dlx.h
