public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  jankratochvil/gdbserverbuildid-locate: sticky
@ 2015-08-12 15:39 jkratoch
  0 siblings, 0 replies; 4+ messages in thread
From: jkratoch @ 2015-08-12 15:39 UTC (permalink / raw)
  To: archer-commits

The branch, jankratochvil/gdbserverbuildid-locate has been updated
  discards  418401189cb3400e44e5fa27114025e8b539f4b3 (commit)
       via  1f37397f1b638f717f2bd0bc6e71fd6fc8e75d39 (commit)
       via  cb87cc5840129399855923ab381d6a11ba502593 (commit)
      from  418401189cb3400e44e5fa27114025e8b539f4b3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 1f37397f1b638f717f2bd0bc6e71fd6fc8e75d39
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:41:00 2015 +0200

    sticky
    
    Message-Id: <1433754079-10395-1-git-send-email-gbenson@redhat.com>
    
    Philippe Waroquiers wrote:
    > On Fri, 2015-06-05 at 12:22 +0100, Gary Benson wrote:
    > > Built and regtested on RHEL6.6 x86_64.
    > I tested with the last SVN version of the Valgrind gdbserver (that
    > supports qXfer:exec-file:read+).
    >
    > The patch introduces a regression:
    > with the patch, GDB does not anymore automatically load the
    > exec-file.
    >
    > I bypassed this problem by ignoring fake_pid_p in remote.c:
    > --- a/gdb/remote.c
    > +++ b/gdb/remote.c
    > @@ -1624,9 +1624,13 @@ remote_add_inferior (int fake_pid_p, int pid, int
    > attached,
    >    inf->attach_flag = attached;
    >    inf->fake_pid_p = fake_pid_p;
    >
    > -  /* If no main executable is currently open then attempt to
    > -     open the file that was executed to create this inferior.  */
    > -  if (try_open_exec && get_exec_file (0) == NULL)
    > +  /* Attempt to open the file that was executed to create this
    > +     inferior.  If the user has explicitly specified executable
    > +     and/or symbol files then warn the user if their choices do
    > +     not match.  Otherwise, set exec_file and symfile_objfile to
    > +     the new file.  */
    > +  printf("fake_pid_p %d\n", fake_pid_p);
    > +  if (try_open_exec)// && !fake_pid_p)
    >      exec_file_locate_attach (pid, 1);
    >
    > Effectively, the printf shows that with Valgrind gdbsrv,
    > fake_pid_p value is 1.
    >
    > When ignoring fake_pid_p, GDB can properly attach
    > to different Valgrind gdbsrv, and changes of executable
    > as expected.
    
    Ah, it seems I mailed a bad patch, my apologies!  I was working on
    two fixes that touched the same line, and it looks like I rebased
    them in the wrong order.
    
    This updated patch has been created against the latest gdb/master
    (80fb91378c91a8239817a5ab2b1c3e346109db25).  Could you please try
    your tests again?
    
    Thanks,
    Gary
    
    
    ---
    On attach, GDB will only attempt to determine the main executable's
    filename if one is not already set.  This causes problems if you
    attach to one process and then attach to another: GDB will not attempt
    to discover the main executable on the second attach.  If the two
    processes have different main executable files then the symbols will
    now be wrong.  This is PR gdb/17626.
    
    In GDB some filenames are supplied by the user (e.g. using the "file"
    or "symbol-file" commands) and some are determined by GDB (e.g. while
    processing an "attach" command).  This commit updates GDB to track
    which filenames were supplied by the user.  When GDB might attempt to
    determine an executable filename and one is already set, filenames
    determined by GDB may be overridden but user-supplied filenames will
    not.
    
    gdb/ChangeLog:
    
    	PR gdb/17626
    	* progspace.h (struct program_space)
    	<pspace_exec_file_is_user_supplied>: New field.
    	<symfile_object_file_is_user_supplied>: Likewise.
    	(symfile_objfile_is_user_supplied): New macro.
    	* exec.h (exec_file_is_user_supplied): Likewise.
    	* exec.c (exec_close): Clear exec_file_is_user_supplied.
    	(exec_file_locate_attach): Remove get_exec_file check.
    	Do not replace user-supplied executable or symbol files.
    	Warn if user-supplied executable or symbol files do not
    	match discovered file.
    	(exec_file_command): Set exec_file_is_user_supplied.
    	* symfile.c (symbol_file_clear): Clear
    	symfile_objfile_is_user_supplied.
    	(symbol_file_command): Set symfile_objfile_is_user_supplied.
    	* inferior.c (add_inferior_command): Set
    	exec_file_is_user_supplied and symfile_objfile_is_user_supplied.
    	* main.c (captured_main): Likewise.
    	* infcmd.c (attach_command_post_wait): Always call
    	exec_file_locate_attach.  Only call reopen_exec_file and
    	reread_symbols if exec_file_is_user_supplied.
    	* remote.c (remote_add_inferior): Remove get_exec_file check
    	around exec_file_locate_attach.

commit cb87cc5840129399855923ab381d6a11ba502593
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 12 17:06:00 2015 +0200

    openptarget

-----------------------------------------------------------------------

Summary of changes:
 gdb/source.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

First 500 lines of diff:
diff --git a/gdb/source.c b/gdb/source.c
index 3c35075..99706a2 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1031,11 +1031,12 @@ openp_file (const char *path, enum openp_flags opts, const char *string, size_t
   if (!path)
     path = ".";
 
-  if ((opts & OPF_TRY_CWD_FIRST) || IS_ABSOLUTE_PATH (string))
+  if ((opts & OPF_TRY_CWD_FIRST) || is_target_filename (string)
+      || IS_ABSOLUTE_PATH (string))
     {
       int i;
 
-      if (is_regular_file (string))
+      if (is_target_filename (string) || is_regular_file (string))
 	{
 	  filename = alloca (strlen (string) + 1);
 	  strcpy (filename, string);


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] 4+ messages in thread
* [SCM]  jankratochvil/gdbserverbuildid-locate: sticky
@ 2015-08-12 14:18 jkratoch
  0 siblings, 0 replies; 4+ messages in thread
From: jkratoch @ 2015-08-12 14:18 UTC (permalink / raw)
  To: archer-commits

The branch, jankratochvil/gdbserverbuildid-locate has been updated
  discards  fdfff5459f87e263811f0fe597946b6ec8ef2ca5 (commit)
  discards  ae03cee1305381dac0621f97d77645c90e9fd907 (commit)
  discards  fd861b8aae745799a44483808388cde6c4f20aaf (commit)
  discards  868abc8257c7e24b2ae4a68c57e5854bb58ecf48 (commit)
  discards  e620804cc6184ac2766423ccbdd8aabaff6b70fa (commit)
  discards  9efcc0216f1fe90dbea76bb8e2738145205c6933 (commit)
  discards  a823fdc321b6fb4cd2c5a46f21f67e961d737590 (commit)
  discards  847a1b1366e3ed0358ea7c8f57142865b52bd863 (commit)
  discards  feb785d4098bf5bba00e940a7ebe6a96ac0edf72 (commit)
  discards  65bf749134458fe10426b700160b670d5643c3eb (commit)
  discards  86cc52cb9b768555c6a8551cdd02064846fd7791 (commit)
  discards  80394b0cb9ca0114f2444f6644b0bf9402966c94 (commit)
  discards  18b680351b49456ba30460c7c5f68abf570706e4 (commit)
  discards  cf9c2659e990164f6c207c34aa0235d78164d7f4 (commit)
  discards  ee862c4e7d47bd38fe07504d5cc71eca33a01281 (commit)
  discards  61aa8f63537242fb9fdc89b948f88b7787b27599 (commit)
  discards  fea5a2a69d6351ecfdce8ec701017a99a41af745 (commit)
  discards  efd2bb0409acad9f0a23fffdd8af9cfd5ac442c9 (commit)
  discards  8b70dce00e539378daf8ba171d7a0890e280c992 (commit)
       via  418401189cb3400e44e5fa27114025e8b539f4b3 (commit)
       via  a46a3ea64e0b226c2f2a0986f38fb3e65afc15d3 (commit)
       via  4f85073201219d8880dea8105878f575f0c8b7f7 (commit)
       via  c5a04e918fb12ecb68fc079b2da0f80a7b20d357 (commit)
       via  704b12ae8f7921594895f498f29f5bf8d1faefa0 (commit)
       via  da855d42ea6c150b4426b672059469b9915d7d56 (commit)
       via  f6be67c72ec0498c8b10437199fcb24fe096e221 (commit)
       via  f10ba24c667f2dda4942506ed6a8ce942e3a2bdf (commit)
       via  18529c35ec3250d12add69aead900ab897e5de7c (commit)
       via  6a5f225738c49b519698a031cc6a0088a676dff7 (commit)
       via  9f3660b58fc677aa7b4606039141b79908da82c5 (commit)
       via  bc9aa10512124621568dcfa4e56c66a51b19a801 (commit)
       via  58dd6320f5d05abd4ce07f2ed839ffad6ff41bd7 (commit)
       via  9f867d31d9988ec8b274db7bb63d6f15b26235c4 (commit)
       via  ae9f88f532f7cbd8299d5fd157cac541805169a4 (commit)
       via  3a6629519fd3498a38c64f47def890c8dc3c9b6b (commit)
       via  27c7d53fe4853c56d28e0b600d347c0538d6d83e (commit)
       via  53c579199e0aa3d6a84fee360298bfb6dc24f3ac (commit)
       via  09f34f7dbb9fa265dac8aa9702b5cfc1b2816771 (commit)
       via  700c754e0f87acd321053cd441c4f97c552d4760 (commit)
       via  4ae2bce3eb769e4a173bfa150d1263b18513b022 (commit)
      from  fdfff5459f87e263811f0fe597946b6ec8ef2ca5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 418401189cb3400e44e5fa27114025e8b539f4b3
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:41:00 2015 +0200

    sticky
    
    Message-Id: <1433754079-10395-1-git-send-email-gbenson@redhat.com>
    
    Philippe Waroquiers wrote:
    > On Fri, 2015-06-05 at 12:22 +0100, Gary Benson wrote:
    > > Built and regtested on RHEL6.6 x86_64.
    > I tested with the last SVN version of the Valgrind gdbserver (that
    > supports qXfer:exec-file:read+).
    >
    > The patch introduces a regression:
    > with the patch, GDB does not anymore automatically load the
    > exec-file.
    >
    > I bypassed this problem by ignoring fake_pid_p in remote.c:
    > --- a/gdb/remote.c
    > +++ b/gdb/remote.c
    > @@ -1624,9 +1624,13 @@ remote_add_inferior (int fake_pid_p, int pid, int
    > attached,
    >    inf->attach_flag = attached;
    >    inf->fake_pid_p = fake_pid_p;
    >
    > -  /* If no main executable is currently open then attempt to
    > -     open the file that was executed to create this inferior.  */
    > -  if (try_open_exec && get_exec_file (0) == NULL)
    > +  /* Attempt to open the file that was executed to create this
    > +     inferior.  If the user has explicitly specified executable
    > +     and/or symbol files then warn the user if their choices do
    > +     not match.  Otherwise, set exec_file and symfile_objfile to
    > +     the new file.  */
    > +  printf("fake_pid_p %d\n", fake_pid_p);
    > +  if (try_open_exec)// && !fake_pid_p)
    >      exec_file_locate_attach (pid, 1);
    >
    > Effectively, the printf shows that with Valgrind gdbsrv,
    > fake_pid_p value is 1.
    >
    > When ignoring fake_pid_p, GDB can properly attach
    > to different Valgrind gdbsrv, and changes of executable
    > as expected.
    
    Ah, it seems I mailed a bad patch, my apologies!  I was working on
    two fixes that touched the same line, and it looks like I rebased
    them in the wrong order.
    
    This updated patch has been created against the latest gdb/master
    (80fb91378c91a8239817a5ab2b1c3e346109db25).  Could you please try
    your tests again?
    
    Thanks,
    Gary
    
    
    ---
    On attach, GDB will only attempt to determine the main executable's
    filename if one is not already set.  This causes problems if you
    attach to one process and then attach to another: GDB will not attempt
    to discover the main executable on the second attach.  If the two
    processes have different main executable files then the symbols will
    now be wrong.  This is PR gdb/17626.
    
    In GDB some filenames are supplied by the user (e.g. using the "file"
    or "symbol-file" commands) and some are determined by GDB (e.g. while
    processing an "attach" command).  This commit updates GDB to track
    which filenames were supplied by the user.  When GDB might attempt to
    determine an executable filename and one is already set, filenames
    determined by GDB may be overridden but user-supplied filenames will
    not.
    
    gdb/ChangeLog:
    
    	PR gdb/17626
    	* progspace.h (struct program_space)
    	<pspace_exec_file_is_user_supplied>: New field.
    	<symfile_object_file_is_user_supplied>: Likewise.
    	(symfile_objfile_is_user_supplied): New macro.
    	* exec.h (exec_file_is_user_supplied): Likewise.
    	* exec.c (exec_close): Clear exec_file_is_user_supplied.
    	(exec_file_locate_attach): Remove get_exec_file check.
    	Do not replace user-supplied executable or symbol files.
    	Warn if user-supplied executable or symbol files do not
    	match discovered file.
    	(exec_file_command): Set exec_file_is_user_supplied.
    	* symfile.c (symbol_file_clear): Clear
    	symfile_objfile_is_user_supplied.
    	(symbol_file_command): Set symfile_objfile_is_user_supplied.
    	* inferior.c (add_inferior_command): Set
    	exec_file_is_user_supplied and symfile_objfile_is_user_supplied.
    	* main.c (captured_main): Likewise.
    	* infcmd.c (attach_command_post_wait): Always call
    	exec_file_locate_attach.  Only call reopen_exec_file and
    	reread_symbols if exec_file_is_user_supplied.
    	* remote.c (remote_add_inferior): Remove get_exec_file check
    	around exec_file_locate_attach.

commit a46a3ea64e0b226c2f2a0986f38fb3e65afc15d3
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:34 2015 +0200

    mainbuildid

commit 4f85073201219d8880dea8105878f575f0c8b7f7
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:33 2015 +0200

    hexallocate

commit c5a04e918fb12ecb68fc079b2da0f80a7b20d357
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:33 2015 +0200

    locatetest

commit 704b12ae8f7921594895f498f29f5bf8d1faefa0
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:33 2015 +0200

    buildidwarn

commit da855d42ea6c150b4426b672059469b9915d7d56
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:33 2015 +0200

    buildidsolibbfdopen

commit f6be67c72ec0498c8b10437199fcb24fe096e221
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:32 2015 +0200

    buildidverify

commit f10ba24c667f2dda4942506ed6a8ce942e3a2bdf
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:32 2015 +0200

    buildidsolibsearch

commit 18529c35ec3250d12add69aead900ab897e5de7c
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:32 2015 +0200

    buildidtofile

commit 6a5f225738c49b519698a031cc6a0088a676dff7
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:32 2015 +0200

    buildidproto

commit 9f3660b58fc677aa7b4606039141b79908da82c5
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:31 2015 +0200

    buildidtobfd

commit bc9aa10512124621568dcfa4e56c66a51b19a801
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:31 2015 +0200

    buildidforcemove

commit 58dd6320f5d05abd4ce07f2ed839ffad6ff41bd7
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:31 2015 +0200

    buildidfreefix

commit 9f867d31d9988ec8b274db7bb63d6f15b26235c4
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:30 2015 +0200

    unvalidate

commit ae9f88f532f7cbd8299d5fd157cac541805169a4
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:30 2015 +0200

    openpsymfile

commit 3a6629519fd3498a38c64f47def890c8dc3c9b6b
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Aug 11 22:34:28 2015 +0200

    openpsolib

commit 27c7d53fe4853c56d28e0b600d347c0538d6d83e
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Aug 11 22:34:28 2015 +0200

    openp

commit 53c579199e0aa3d6a84fee360298bfb6dc24f3ac
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Aug 11 22:34:28 2015 +0200

    filelib

commit 09f34f7dbb9fa265dac8aa9702b5cfc1b2816771
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 12 16:04:36 2015 +0200

    openfromtargetdoclose

commit 700c754e0f87acd321053cd441c4f97c552d4760
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 12 15:23:00 2015 +0200

    openfromtargetfd

commit 4ae2bce3eb769e4a173bfa150d1263b18513b022
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 12 15:12:12 2015 +0200

    openfromtarget

-----------------------------------------------------------------------

Summary of changes:
 gdb/gdb_bfd.c |   32 ++++++++++++++++++++++++--------
 gdb/gdb_bfd.h |    2 ++
 gdb/source.c  |   50 ++++++++++++++++++++------------------------------
 3 files changed, 46 insertions(+), 38 deletions(-)

First 500 lines of diff:
diff --git a/gdb/gdb_bfd.c b/gdb/gdb_bfd.c
index e7a0a32..cc1341d 100644
--- a/gdb/gdb_bfd.c
+++ b/gdb/gdb_bfd.c
@@ -300,6 +300,15 @@ gdb_bfd_iovec_fileio_close (struct bfd *abfd, void *stream)
   return 0;
 }
 
+static int
+gdb_bfd_iovec_fileio_close_nop (struct bfd *abfd, void *stream)
+{
+  xfree (stream);
+
+  /* Zero means success.  */
+  return 0;
+}
+
 /* Wrapper for target_fileio_fstat suitable for passing as the
    STAT_FUNC argument to gdb_bfd_openr_iovec.  */
 
@@ -321,6 +330,20 @@ gdb_bfd_iovec_fileio_fstat (struct bfd *abfd, void *stream,
   return result;
 }
 
+struct bfd *
+gdb_bfd_open_from_target (const char *name, const char *target, int fd, int do_close)
+{
+  gdb_assert (is_target_filename (name));
+  gdb_assert (!target_filesystem_is_local ());
+
+  return gdb_bfd_openr_iovec (name, target,
+			      (fd == -1 ? gdb_bfd_iovec_fileio_open : gdb_bfd_iovec_fileio_open_fd),
+			      (fd == -1 ? (void *) current_inferior () : (void *) &fd),
+			      gdb_bfd_iovec_fileio_pread,
+			      do_close ? gdb_bfd_iovec_fileio_close : gdb_bfd_iovec_fileio_close_nop,
+			      gdb_bfd_iovec_fileio_fstat);
+}
+
 /* See gdb_bfd.h.  */
 
 struct bfd *
@@ -335,14 +358,7 @@ gdb_bfd_open (const char *name, const char *target, int fd)
   if (is_target_filename (name))
     {
       if (!target_filesystem_is_local ())
-	{
-	  return gdb_bfd_openr_iovec (name, target,
-				      (fd == -1 ? gdb_bfd_iovec_fileio_open : gdb_bfd_iovec_fileio_open_fd),
-				      (fd == -1 ? (void *) current_inferior () : (void *) &fd),
-				      gdb_bfd_iovec_fileio_pread,
-				      gdb_bfd_iovec_fileio_close,
-				      gdb_bfd_iovec_fileio_fstat);
-	}
+	return gdb_bfd_open_from_target (name, target, fd, 1 /* do_close */);
 
       name += strlen (TARGET_SYSROOT_PREFIX);
     }
diff --git a/gdb/gdb_bfd.h b/gdb/gdb_bfd.h
index 2ec8285..e42ee9c 100644
--- a/gdb/gdb_bfd.h
+++ b/gdb/gdb_bfd.h
@@ -53,6 +53,8 @@ int gdb_bfd_has_target_filename (struct bfd *abfd);
 
 struct bfd *gdb_bfd_open (const char *name, const char *target, int fd);
 
+struct bfd *gdb_bfd_open_from_target (const char *name, const char *target, int fd, int do_close);
+
 /* Increment the reference count of ABFD.  It is fine for ABFD to be
    NULL; in this case the function does nothing.  */
 
diff --git a/gdb/source.c b/gdb/source.c
index 41b859e..3c35075 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -786,8 +786,7 @@ file_location_from_filename (const char *filename, int is_bfd, size_t build_idsz
 {
   struct file_location file;
   int load_via_target = 0;
-  int fd_dup = -1;
-  struct cleanup *back_to, *fd_dup_cleanup;
+  struct cleanup *back_to;
 
   memset (&file, 0, sizeof (file));
   file.fd = -1;
@@ -814,8 +813,8 @@ file_location_from_filename (const char *filename, int is_bfd, size_t build_idsz
       int target_errno;
 
       file.fd = target_fileio_open (current_inferior (),
-				      filename, FILEIO_O_RDONLY, 0,
-				      &target_errno);
+				    filename, FILEIO_O_RDONLY, 0,
+				    &target_errno);
       if (file.fd == -1)
 	{
 	  file.file_errno = fileio_errno_to_host (target_errno);
@@ -842,43 +841,38 @@ file_location_from_filename (const char *filename, int is_bfd, size_t build_idsz
       return file;
     }
 
-  fd_dup_cleanup = make_cleanup (null_cleanup, NULL);
-  if (!is_bfd)
+  if (load_via_target)
     {
-      fd_dup = dup (file.fd);
-      if (fd_dup == -1)
-	{
-	  file.file_errno = errno;
-	  close (file.fd);
-	  file.fd = -1;
-	  discard_cleanups (back_to);
-	  return file;
-	}
-      make_cleanup_close (fd_dup);
-    }
+      const int do_close = is_bfd;
 
-  if (write_files && !load_via_target)
-    file.abfd = gdb_bfd_fopen (filename, gnutarget, FOPEN_RUB, file.fd);
+      gdb_assert (strcmp (filename, file.filename + strlen (TARGET_SYSROOT_PREFIX)) == 0);
+      file.abfd = gdb_bfd_open_from_target (file.filename, gnutarget, file.fd, do_close);
+      if (do_close && file.abfd != NULL)
+	file.fd = -1;
+    }
+  else if (write_files)
+    {
+      file.abfd = gdb_bfd_fopen (filename, gnutarget, FOPEN_RUB, file.fd);
+      file.fd = -1;
+    }
   else
     {
       char *canonical;
-      struct cleanup *canonical_cleanup;
 
       /* gdb_bfd_open (and its variants) prefers canonicalized
 	 pathname for better BFD caching.  */
-      if (load_via_target)
-	canonical = xstrdup (filename);
-      else
-	canonical = gdb_realpath (filename);
+      struct cleanup *canonical_cleanup;
+
+      canonical = gdb_realpath (filename);
       canonical_cleanup = make_cleanup (xfree, canonical);
       file.abfd = gdb_bfd_open (canonical, gnutarget, file.fd);
+      file.fd = -1;
       do_cleanups (canonical_cleanup);
     }
-  file.fd = -1;
+
   if (file.abfd == NULL)
     {
       file.bfderr = bfd_get_error ();
-      do_cleanups (fd_dup_cleanup);
       discard_cleanups (back_to);
       return file;
     }
@@ -886,7 +880,6 @@ file_location_from_filename (const char *filename, int is_bfd, size_t build_idsz
   if (build_idsz == 0)
     {
       gdb_assert (is_bfd);
-      gdb_assert (fd_dup == -1);
       discard_cleanups (back_to);
       return file;
     }
@@ -898,13 +891,10 @@ file_location_from_filename (const char *filename, int is_bfd, size_t build_idsz
       return file;
     }
 
-  gdb_assert ((!is_bfd) == (fd_dup != -1));
   if (!is_bfd)
     {
       gdb_bfd_unref (file.abfd);
       file.abfd = NULL;
-      gdb_assert (file.fd == -1);
-      file.fd = fd_dup;
       gdb_assert (file.fd != -1);
     }
 


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] 4+ messages in thread
* [SCM]  jankratochvil/gdbserverbuildid-locate: sticky
@ 2015-08-11 21:01 jkratoch
  0 siblings, 0 replies; 4+ messages in thread
From: jkratoch @ 2015-08-11 21:01 UTC (permalink / raw)
  To: archer-commits

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 146633 bytes --]

The branch, jankratochvil/gdbserverbuildid-locate has been updated
  discards  d11dfeff36085e72697b0935fa9ea7b478502be3 (commit)
  discards  5bb913190de7ef138463e6dac4fd4161e00a352b (commit)
  discards  652d48b40862076ce2bf51dfa3cf721e51be78d6 (commit)
  discards  5ff39b6e672dd158110b59091137c51558e8a17a (commit)
  discards  c9a2870e237c57bd791a761f35a3657c405388c0 (commit)
  discards  aba047ecde86b2aca84b6ea403645dbc6dfda4f9 (commit)
  discards  7b78ff694e36c0391a51d08764c9070eb864fcab (commit)
  discards  1fb2a28254f3fa02b876e7c9eac8ed50fad20b3c (commit)
  discards  29ae97c2a99b590f7a1e5fce610bb07562fb77b4 (commit)
  discards  2858b417b03809d653a1b432adfc1e05ba8e2eca (commit)
  discards  a3110c7b4bb8e1d8705e72c5d7aa31e2e889f34d (commit)
  discards  111af182305566a065841f51a42e48d34e4159fa (commit)
  discards  c291ee26e669f02ae872956ad5f39263d7351a7d (commit)
  discards  108dd1aa6d678f8b2f3938eb9854502c2ceb4c1f (commit)
  discards  5f7f919b9f15e4158eaa9ba8d1865182a29ff5fb (commit)
  discards  028d23ba5152daa5c59a7f85bd3a08c2ba93ae68 (commit)
  discards  fd1312a6b9f9a54c69ca6852a5e305213dfe7fd5 (commit)
  discards  a61ca3ebe307358102d7a172ef8ec39cd02e9db7 (commit)
  discards  38e9eefa67fd1b6dbc477227bb2aca8f8ed81ccc (commit)
  discards  d4ce568a895cd2567bf06f4be2e51e9417401fc4 (commit)
  discards  c37f1754c8e7fc3993edf9be4f959823508fd4b2 (commit)
  discards  903dc1fe73d28ed8cfb49e2639438529084568cd (commit)
  discards  04f4385dea44eb3b377181c2aef85c420ce7bfbd (commit)
  discards  fa4273cdac197b1ee9bd9ced0302ad6cb81baad9 (commit)
  discards  e9ca80639af74cbc23b266e1bf7a4abd2fb63e7a (commit)
  discards  d02982822a709b5ccfcddeeaf6a2648bcecff266 (commit)
  discards  99416e9384ecd012925eaaaa1ded88df88d37546 (commit)
       via  fdfff5459f87e263811f0fe597946b6ec8ef2ca5 (commit)
       via  ae03cee1305381dac0621f97d77645c90e9fd907 (commit)
       via  fd861b8aae745799a44483808388cde6c4f20aaf (commit)
       via  868abc8257c7e24b2ae4a68c57e5854bb58ecf48 (commit)
       via  e620804cc6184ac2766423ccbdd8aabaff6b70fa (commit)
       via  9efcc0216f1fe90dbea76bb8e2738145205c6933 (commit)
       via  a823fdc321b6fb4cd2c5a46f21f67e961d737590 (commit)
       via  847a1b1366e3ed0358ea7c8f57142865b52bd863 (commit)
       via  feb785d4098bf5bba00e940a7ebe6a96ac0edf72 (commit)
       via  65bf749134458fe10426b700160b670d5643c3eb (commit)
       via  86cc52cb9b768555c6a8551cdd02064846fd7791 (commit)
       via  80394b0cb9ca0114f2444f6644b0bf9402966c94 (commit)
       via  18b680351b49456ba30460c7c5f68abf570706e4 (commit)
       via  cf9c2659e990164f6c207c34aa0235d78164d7f4 (commit)
       via  ee862c4e7d47bd38fe07504d5cc71eca33a01281 (commit)
       via  61aa8f63537242fb9fdc89b948f88b7787b27599 (commit)
       via  fea5a2a69d6351ecfdce8ec701017a99a41af745 (commit)
       via  efd2bb0409acad9f0a23fffdd8af9cfd5ac442c9 (commit)
       via  8b70dce00e539378daf8ba171d7a0890e280c992 (commit)
       via  d42beee1aec30b9f4097979f2ab07214fcca3d95 (commit)
       via  17906c8d67cbe67be648b292c6f344477600d7f9 (commit)
       via  0a8f785466dbfad09b32e1ce76759049be4f65b2 (commit)
       via  3d0cb2c5b709dfe05fd3abd2d001f9a46fbf0686 (commit)
       via  d879323ac26a303234a0286d10b8b1939d97a3dc (commit)
       via  7c4a05d5f2b5acaf762c6ff1c7caf7aa83128c32 (commit)
       via  0956a0bae075d09240541446f183e0810e20d2a0 (commit)
       via  4876094c705235a5f2d81f2333dbea0d625e9697 (commit)
       via  40fbed84815b00960f7fac8d2e7857942df4308c (commit)
       via  70151fb54ab6e3d5dc7f99fe3fbfa7ad2f1ab2af (commit)
       via  73f925cc20e839d4b7352b809a33e4e7dcbfa05a (commit)
       via  a12fad50d28b9251893c6709ac4374773350c21a (commit)
       via  56a2e4507a4249634422fba2373b651b774c55ac (commit)
       via  f69e49203b49b7353748b78a9d8111440d9ac291 (commit)
       via  1107e076cff62e1093da024ab73e5648051781ab (commit)
       via  2c0a466a7f83eb1ee5f5da0bdd7b4b643fbe3278 (commit)
       via  97dc35c88dd470465a99edeb0b491012a368f2bf (commit)
       via  922c5db5e733526f12e2fbfeb72c7f1f90089d53 (commit)
       via  dbac553d28887561e3f154654ec8e70195d89943 (commit)
       via  4c0160b8e2f902ecdf6a42dc20b5f39b0a48fac7 (commit)
       via  c8373ebb4ed77c361d95aa806cfbe1b4062b5be5 (commit)
       via  4b0e8a5f80441fad8eddaf68e7af70bd6991aa37 (commit)
       via  64140f86ab732f9ed87beccab07c32befaf9ca52 (commit)
       via  eff0bc54a343fed1dd152f0a1b455b2438f76e6f (commit)
       via  e66c3c2568fcfebc931bc18d35055c7f784133ce (commit)
       via  d29b2a1ece30514431861472d784ae8722816a4c (commit)
       via  88fd0449a3f88c12c8930698a833f6c1c4478307 (commit)
       via  2b29bb41d56d4e4ba495393f4f519718b73f92df (commit)
       via  30379291886a171e6dc202122bc1c583318c2e17 (commit)
       via  125453567f4a0abc68cfc67a3df46be1aa9bb904 (commit)
       via  80af41e00325ff3e877df11d465baeaa3d565103 (commit)
       via  e27852be65403306da198b3c1d7b222acd6bdfe9 (commit)
       via  fd7dcb94cbd44629b3929336aec8b76c3e339656 (commit)
       via  422f11824b3abf6c71042e2ee3aed572f250fc89 (commit)
       via  75fb7498c25ba89262867abe5340a8d38f1e19cd (commit)
       via  2bc6d61bf3e4935921ae2612b3c6cd0604428960 (commit)
       via  662a7b62c477e93284de4db127b4dbc3529caaa5 (commit)
       via  8fe3f3d6afbf084f9ef36d887b661792c769f862 (commit)
       via  e44bf850dff24e0442408e26043d957588be88ee (commit)
       via  0a77d46120137650c13091866cb93150910e1317 (commit)
       via  d4ac1f878ecef58f1e4b4ff0cbfb4b475656eaf4 (commit)
       via  f12899e9f081bb857c96999386e64a4252c4a325 (commit)
       via  5ac213430b710e8aaed1f4cea6ff809783201df9 (commit)
       via  7f03bd92e389a32da490bb55037881cf374d0f69 (commit)
       via  3fc8eb30a95df3fd07a63e9bd0a9d309b86a0357 (commit)
       via  d4569d7bc572ae8f10d7c527cbdfbc9d26cc1ed8 (commit)
       via  bfedc46af315dc6484295699c35e05040d76d700 (commit)
       via  d55007b58352c0b5fd2817e003b6dcf4e3ee4c07 (commit)
       via  fbea99ea8a062e5cd96e2d88336984ed3adc93d4 (commit)
       via  372316f12874a30c62e6d71079ca3b86c786fb7e (commit)
       via  2ac7589cfe1df06506adb133e99b2b89212c9a11 (commit)
       via  8b0615634896718c982d367a01ec61120084d3fb (commit)
       via  1afd5965eda86caed3af7f23fd1f8802831360b6 (commit)
       via  4d9d9d0423ed611fa6d620ca3aa088fc16a0d59e (commit)
       via  c2829269f5af8a860b54ceac3596610b1f51fee5 (commit)
       via  6c4cfb244b408f980be24ea2175bc58baf74a6f9 (commit)
       via  567420d10895611e03d5ee65e6b24c16a69a6e99 (commit)
       via  d8dd4d5fe6d5ab971b731df5f65025a0dbbdb912 (commit)
       via  e1316e60d4d1fe406efc6e7536b2bdb43733e9d2 (commit)
       via  47e9c225c1cb6fb1809218f5f546a70fc85f705c (commit)
       via  5960642af99c6dc84b28e1bc69a617099b9dee97 (commit)
       via  36aed29d3774a156c88ca7110f3c12605d861b9c (commit)
       via  6e33951edcbed1fd803beabcde2af3b252b92164 (commit)
       via  060967202b8def804d9afccad343d2eaef8a81cf (commit)
       via  7ff38b1c898be5db053193f26d6a3a1d8a6074e8 (commit)
       via  0b45135ec1364f9d0c850a52ce05cf4ffb038021 (commit)
       via  da8c46d2967b6325dcd2cc72eca26d807964c93c (commit)
       via  5599c404621b2d8ac021c1427aee6e8974572042 (commit)
       via  016a3251631341bf4d8fe50966d2b70f8ea69e96 (commit)
       via  308d9764e1ce02c31882e6d99bbaebe63c7fe830 (commit)
       via  de1c2c52237dd3e8d94df7b4a304ac9df75c8cf3 (commit)
       via  782e0bf46a84f57139f25c31c2ffc93508f07ef5 (commit)
       via  aead7601eb0ddc3fa51d43747bdad0e02abda342 (commit)
       via  84da3f0cf938f8f74d9fa89f89f228bc950282c6 (commit)
       via  9d996aba1a365564c18dd939772d379c97c94213 (commit)
       via  33ebda9d6841e18d9ef18b94c3dcad7d0498ab3d (commit)
       via  a44892be35506471a53e5bc8c2def4ffccf451f9 (commit)
       via  ca0a5f0bd33d0aa17a5cf518e41e47ddfde486ad (commit)
       via  608a1e46394e9df951968c9112fbec3065da5fba (commit)
       via  05d999b0896ab6ccd4ce23a715765484c60a967d (commit)
       via  f0ce0d3a331129309a46a6a9ac85fce35acae72b (commit)
       via  bf47e2482d3e88580ba5a22db48bc773fa8ced3f (commit)
       via  f6a9d9c7db9b6b58e6915869c1bd7c83d96d31ee (commit)
       via  83e97ed023e828a7d924b765661374272c7f7eb4 (commit)
       via  4807d3f32937bc4d932638fd8f8b3084be82b74a (commit)
       via  b6b9ffccac04b8729d5206b5a9fefa09ea2510f3 (commit)
       via  863d01bde2725d009c45ab7e9ba1dbf3f5b923f8 (commit)
       via  00db26facc14ac830adef704bba9b24d0d366ddf (commit)
       via  ad071a3055b9b47dad340c1a1cb3a9b39529cef0 (commit)
       via  e0a3af227ee0602ae69320fd6f931c363f14975b (commit)
       via  0cf003f49ee8bbd5dc5f1ce45193c7ae056c69b8 (commit)
      from  d11dfeff36085e72697b0935fa9ea7b478502be3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit fdfff5459f87e263811f0fe597946b6ec8ef2ca5
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:41:00 2015 +0200

    sticky
    
    Message-Id: <1433754079-10395-1-git-send-email-gbenson@redhat.com>
    
    Philippe Waroquiers wrote:
    > On Fri, 2015-06-05 at 12:22 +0100, Gary Benson wrote:
    > > Built and regtested on RHEL6.6 x86_64.
    > I tested with the last SVN version of the Valgrind gdbserver (that
    > supports qXfer:exec-file:read+).
    >
    > The patch introduces a regression:
    > with the patch, GDB does not anymore automatically load the
    > exec-file.
    >
    > I bypassed this problem by ignoring fake_pid_p in remote.c:
    > --- a/gdb/remote.c
    > +++ b/gdb/remote.c
    > @@ -1624,9 +1624,13 @@ remote_add_inferior (int fake_pid_p, int pid, int
    > attached,
    >    inf->attach_flag = attached;
    >    inf->fake_pid_p = fake_pid_p;
    >
    > -  /* If no main executable is currently open then attempt to
    > -     open the file that was executed to create this inferior.  */
    > -  if (try_open_exec && get_exec_file (0) == NULL)
    > +  /* Attempt to open the file that was executed to create this
    > +     inferior.  If the user has explicitly specified executable
    > +     and/or symbol files then warn the user if their choices do
    > +     not match.  Otherwise, set exec_file and symfile_objfile to
    > +     the new file.  */
    > +  printf("fake_pid_p %d\n", fake_pid_p);
    > +  if (try_open_exec)// && !fake_pid_p)
    >      exec_file_locate_attach (pid, 1);
    >
    > Effectively, the printf shows that with Valgrind gdbsrv,
    > fake_pid_p value is 1.
    >
    > When ignoring fake_pid_p, GDB can properly attach
    > to different Valgrind gdbsrv, and changes of executable
    > as expected.
    
    Ah, it seems I mailed a bad patch, my apologies!  I was working on
    two fixes that touched the same line, and it looks like I rebased
    them in the wrong order.
    
    This updated patch has been created against the latest gdb/master
    (80fb91378c91a8239817a5ab2b1c3e346109db25).  Could you please try
    your tests again?
    
    Thanks,
    Gary
    
    
    ---
    On attach, GDB will only attempt to determine the main executable's
    filename if one is not already set.  This causes problems if you
    attach to one process and then attach to another: GDB will not attempt
    to discover the main executable on the second attach.  If the two
    processes have different main executable files then the symbols will
    now be wrong.  This is PR gdb/17626.
    
    In GDB some filenames are supplied by the user (e.g. using the "file"
    or "symbol-file" commands) and some are determined by GDB (e.g. while
    processing an "attach" command).  This commit updates GDB to track
    which filenames were supplied by the user.  When GDB might attempt to
    determine an executable filename and one is already set, filenames
    determined by GDB may be overridden but user-supplied filenames will
    not.
    
    gdb/ChangeLog:
    
    	PR gdb/17626
    	* progspace.h (struct program_space)
    	<pspace_exec_file_is_user_supplied>: New field.
    	<symfile_object_file_is_user_supplied>: Likewise.
    	(symfile_objfile_is_user_supplied): New macro.
    	* exec.h (exec_file_is_user_supplied): Likewise.
    	* exec.c (exec_close): Clear exec_file_is_user_supplied.
    	(exec_file_locate_attach): Remove get_exec_file check.
    	Do not replace user-supplied executable or symbol files.
    	Warn if user-supplied executable or symbol files do not
    	match discovered file.
    	(exec_file_command): Set exec_file_is_user_supplied.
    	* symfile.c (symbol_file_clear): Clear
    	symfile_objfile_is_user_supplied.
    	(symbol_file_command): Set symfile_objfile_is_user_supplied.
    	* inferior.c (add_inferior_command): Set
    	exec_file_is_user_supplied and symfile_objfile_is_user_supplied.
    	* main.c (captured_main): Likewise.
    	* infcmd.c (attach_command_post_wait): Always call
    	exec_file_locate_attach.  Only call reopen_exec_file and
    	reread_symbols if exec_file_is_user_supplied.
    	* remote.c (remote_add_inferior): Remove get_exec_file check
    	around exec_file_locate_attach.

commit ae03cee1305381dac0621f97d77645c90e9fd907
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:34 2015 +0200

    mainbuildid

commit fd861b8aae745799a44483808388cde6c4f20aaf
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:33 2015 +0200

    hexallocate

commit 868abc8257c7e24b2ae4a68c57e5854bb58ecf48
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:33 2015 +0200

    locatetest

commit e620804cc6184ac2766423ccbdd8aabaff6b70fa
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:33 2015 +0200

    buildidwarn

commit 9efcc0216f1fe90dbea76bb8e2738145205c6933
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:33 2015 +0200

    buildidsolibbfdopen

commit a823fdc321b6fb4cd2c5a46f21f67e961d737590
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:32 2015 +0200

    buildidverify

commit 847a1b1366e3ed0358ea7c8f57142865b52bd863
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:32 2015 +0200

    buildidsolibsearch

commit feb785d4098bf5bba00e940a7ebe6a96ac0edf72
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:32 2015 +0200

    buildidtofile

commit 65bf749134458fe10426b700160b670d5643c3eb
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:32 2015 +0200

    buildidproto

commit 86cc52cb9b768555c6a8551cdd02064846fd7791
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:31 2015 +0200

    buildidtobfd

commit 80394b0cb9ca0114f2444f6644b0bf9402966c94
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:31 2015 +0200

    buildidforcemove

commit 18b680351b49456ba30460c7c5f68abf570706e4
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:31 2015 +0200

    buildidfreefix

commit cf9c2659e990164f6c207c34aa0235d78164d7f4
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:30 2015 +0200

    unvalidate

commit ee862c4e7d47bd38fe07504d5cc71eca33a01281
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:30 2015 +0200

    openpsymfile

commit 61aa8f63537242fb9fdc89b948f88b7787b27599
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Aug 11 22:34:28 2015 +0200

    openpsolib

commit fea5a2a69d6351ecfdce8ec701017a99a41af745
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Aug 11 22:34:28 2015 +0200

    openp

commit efd2bb0409acad9f0a23fffdd8af9cfd5ac442c9
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Aug 11 22:34:28 2015 +0200

    filelib

commit 8b70dce00e539378daf8ba171d7a0890e280c992
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Aug 11 22:34:28 2015 +0200

    targetfd

commit d42beee1aec30b9f4097979f2ab07214fcca3d95
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Aug 11 22:34:27 2015 +0200

    openpnullpathname

commit 17906c8d67cbe67be648b292c6f344477600d7f9
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Aug 11 22:34:27 2015 +0200

    openpmode

commit 0a8f785466dbfad09b32e1ce76759049be4f65b2
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Aug 11 22:34:27 2015 +0200

    openppath

commit 3d0cb2c5b709dfe05fd3abd2d001f9a46fbf0686
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Aug 11 22:34:27 2015 +0200

    openpenum

commit d879323ac26a303234a0286d10b8b1939d97a3dc
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Aug 11 22:34:26 2015 +0200

    sysrootdelim

commit 7c4a05d5f2b5acaf762c6ff1c7caf7aa83128c32
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Aug 11 22:34:26 2015 +0200

    sysrootconst

commit 0956a0bae075d09240541446f183e0810e20d2a0
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Fri Jul 17 22:31:05 2015 +0200

    build-id: -config,+configure.tgt

commit 4876094c705235a5f2d81f2333dbea0d625e9697
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Fri Jul 17 22:30:32 2015 +0200

    Revert "Revert the previous 7 commits of: Validate binary before use"
    
    This reverts commit db1ff28b60f8886b8d7c634f1db2f939ba47a13c.
    
    Conflicts:
    	gdb/ChangeLog
    	gdb/gdbserver/ChangeLog
    	gdb/testsuite/ChangeLog

commit 40fbed84815b00960f7fac8d2e7857942df4308c
Author: Jiong Wang <jiong.wang@arm.com>
Date:   Tue Aug 11 17:44:30 2015 +0100

    [AArch64][8/8] LD support BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12
    
    2015-08-11  Jiong Wang  <jiong.wang@arm.com>
    
    bfd/
      * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
      BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
      (aarch64_reloc_got_type): Likewise.
      (elfNN_aarch64_final_link_relocate): Likewise.
      (elfNN_aarch64_relocate_section): Likewise.
      * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
      (_bfd_aarch64_elf_resolve_relocation): Likewise.
    
    ld/testsuite/
      * ld-aarch64/emit-relocs-529.s: New testcase.
      * ld-aarch64/emit-relocs-529-overflow.s: Likewise.
      * ld-aarch64/emit-relocs-86.s: Likewise.
      * ld-aarch64/emit-relocs-86-overflow.s: Likewise.
      * ld-aarch64/emit-relocs-529.d: New expectation file.
      * ld-aarch64/emit-relocs-529-overflow.d: Likewise.
      * ld-aarch64/emit-relocs-86.d: Likewise.
      * ld-aarch64/emit-relocs-86-overflow.d: Likewise.
      * ld-aarch64/aarch64-elf.exp: Run new testcases.

commit 70151fb54ab6e3d5dc7f99fe3fbfa7ad2f1ab2af
Author: Jiong Wang <jiong.wang@arm.com>
Date:   Tue Aug 11 17:38:49 2015 +0100

    [AArch64][7/8] GAS support BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12
    
    2015-08-11  Jiong Wang  <jiong.wang@arm.com>
    
    include/elf/
      * aarch64.h (R_AARCH64_P32_TLSLD_ADD_DTPREL_LO12): Define.
    
    bfd/
      * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12): New entry.
      * bfd-in2.h: Regenerate.
      * libbfd.h: Regenerate.
      * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
      BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
    
    gas/
      * config/tc-aarch64.c (reloc_table): New relocation modifiers
      "dtprel_lo12".
      (md_apply_fix): Support BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
      (aarch64_force_relocation): Likewise.
    
    gas/testsuite/
      * gas/aarch64/reloc-dtprel_lo12-1.s: New testcase.
      * gas/aarch64/reloc-dtprel_lo12-ilp32-1.s: Likewise.
      * gas/aarch64/reloc-dtprel_lo12-1.d: New expectation file.
      * gas/aarch64/reloc-dtprel_lo12-ilp32-1.d: Likewise.

commit 73f925cc20e839d4b7352b809a33e4e7dcbfa05a
Author: Jiong Wang <jiong.wang@arm.com>
Date:   Tue Aug 11 17:20:17 2015 +0100

    [AArch64][6/8] LD support BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC
    
    2015-08-11  Jiong Wang  <jiong.wang@arm.com>
    
    bfd/
      * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
      BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
      (aarch64_reloc_got_type): Likewise.
      (elfNN_aarch64_final_link_relocate): Likewise.
      (elfNN_aarch64_relocate_section): Likewise.
      (elfNN_aarch64_gc_sweep_hook): Likewise.
      (elfNN_aarch64_check_relocs): Likewise.
      * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
      (_bfd_aarch64_elf_resolve_relocation): Likewise.
    
    ld/testsuite/
      * ld-aarch64/tls-small-ld.s: Update testcase.

commit a12fad50d28b9251893c6709ac4374773350c21a
Author: Jiong Wang <jiong.wang@arm.com>
Date:   Tue Aug 11 17:15:56 2015 +0100

    [AArch64][5/8] GAS support BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC
    
    2015-08-11  Jiong Wang  <jiong.wang@arm.com>
    
    bfd/
      * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC): New entry.
      * bfd-in2.h: Regenerate.
      * libbfd.h: Regenerate.
      * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
      BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
    
    gas/
      * config/tc-aarch64.c (reloc_table): New relocation modifiers.
      (md_apply_fix): Support BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
      (aarch64_force_relocation): Likewise.
    
    gas/testsuite/
      * gas/aarch64/reloc-tlsldm_lo12_nc-1.s: New testcase.
      * gas/aarch64/reloc-tlsldm_lo12_nc-ilp32-1.s: Likewise.
      * gas/aarch64/reloc-tlsldm_lo12_nc-1.d: New expectation file.
      * gas/aarch64/reloc-tlsldm_lo12_nc-ilp32-1.d: Likewise.

commit 56a2e4507a4249634422fba2373b651b774c55ac
Author: Jiong Wang <jiong.wang@arm.com>
Date:   Tue Aug 11 17:07:30 2015 +0100

    [AArch64][4/8] Add R_AARCH64_P32_TLSLD_ADD_LO12_NC in elf header
    
    2015-08-11  Jiong Wang  <jiong.wang@arm.com>
    
    include/elf/
      * aarch64.h (R_AARCH64_P32_TLSLD_ADD_LO12_NC): Define.

commit f69e49203b49b7353748b78a9d8111440d9ac291
Author: Jiong Wang <jiong.wang@arm.com>
Date:   Tue Aug 11 17:05:34 2015 +0100

    [AArch64][3/8] LD support BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21
    
    2015-08-11  Jiong Wang  <jiong.wang@arm.com>
    
    bfd/
      * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
      BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
      (aarch64_reloc_got_type): Likewise.
      (elfNN_aarch64_final_link_relocate): Likewise.
      (elfNN_aarch64_relocate_section): Likewise.
      (elfNN_aarch64_gc_sweep_hook): Likewise.
      (elfNN_aarch64_check_relocs): Likewise.
      * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
      (_bfd_aarch64_elf_resolve_relocation): Likewise.
    
    ld/testsuite/
      * ld-aarch64/tls-small-ld.s: New file.
      * ld-aarch64/tls-small-ld.d: Likewise.
      * ld-aarch64/aarch64-elf.exp: Run new test.

commit 1107e076cff62e1093da024ab73e5648051781ab
Author: Jiong Wang <jiong.wang@arm.com>
Date:   Tue Aug 11 16:58:20 2015 +0100

    [AArch64][2/8] GAS support BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21
    
    2015-08-11  Jiong Wang  <jiong.wang@arm.com>
    
    bfd/
      * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21): New entry.
      * bfd-in2.h: Regenerate.
      * libbfd.h: Regenerate.
      * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
      BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
    
    gas/
      * config/tc-aarch64.c (reloc_table): New relocation modifiers.
      (md_apply_fix): Support BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
      (aarch64_force_relocation): Likewise.
    
    gas/testsuite/
      * gas/aarch64/reloc-tlsldm-page-1.s: New testcase.
      * gas/aarch64/reloc-tlsldm-page-ilp32-1.s: Likewise.
      * gas/aarch64/reloc-tlsldm-page-1.d: New expectation file.
      * gas/aarch64/reloc-tlsldm-page-ilp32-1.d: Likewise.

commit 2c0a466a7f83eb1ee5f5da0bdd7b4b643fbe3278
Author: Jiong Wang <jiong.wang@arm.com>
Date:   Tue Aug 11 16:53:12 2015 +0100

    [AArch64][1/8] Add R_AARCH64_P32_TLSLD_ADR_PAGE21 in elf header
    
    2015-08-11  Jiong Wang  <jiong.wang@arm.com>
    
    include/elf/
      * aarch64.h (R_AARCH64_P32_TLSLD_ADR_PAGE21): Define.

commit 97dc35c88dd470465a99edeb0b491012a368f2bf
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Aug 11 12:58:52 2015 -0700

    Skip IFUNC relocations in debug sections
    
    Skip IFUNC relocations in debug sections ignored by ld.so.
    
    bfd/
    
    	PR ld/18808
    	* elf32-i386.c (elf_i386_relocate_section): Skip IFUNC
    	relocations in debug sections.
    	* elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
    
    ld/testsuite/
    
    	PR ld/18808
    	* ld-ifunc/ifunc.exp: Add a test for PR ld/18808.
    	* ld-ifunc/pr18808.out: New file.
    	* ld-ifunc/pr18808a.c: Likewise.
    	* ld-ifunc/pr18808b.c: Likewise.

commit 922c5db5e733526f12e2fbfeb72c7f1f90089d53
Author: Nick Clifton <nickc@redhat.com>
Date:   Tue Aug 11 18:00:36 2015 +0100

    Fix the disassembly of the AArch64 SIMD EXT instruction.
    
    	PR 18800
    	* aarch64-tbl.h (aarch64_opcode_table): Fix mask for SIMD EXT
    	instruction.

commit dbac553d28887561e3f154654ec8e70195d89943
Author: Peter Zotov <whitequark@whitequark.org>
Date:   Tue Aug 11 17:12:21 2015 +0100

    Fix encoding or OpenRisk1000 PC relative relocations.
    
    	PR ld/18759
    	* elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE.
    	(R_OR1K_16_PCREL): Likewise.
    	(R_OR1K_8_PCREL): Likewise.

commit 4c0160b8e2f902ecdf6a42dc20b5f39b0a48fac7
Author: Nick Clifton <nickc@redhat.com>
Date:   Tue Aug 11 17:02:25 2015 +0100

    Fix typo in coff-sh.c.
    
    	PR binutils/18747
    	* coff-sh.c (_bfd_sh_align_load_span): Fix typo when setting
    	opcode count.

commit c8373ebb4ed77c361d95aa806cfbe1b4062b5be5
Author: Alan Modra <amodra@gmail.com>
Date:   Tue Aug 11 21:54:48 2015 +0930

    Tweak binutils testsuite
    
    Some targets provide aligned .bss sections, so explicitly align.
    msp430 and rl78 emit "magic" symbols when assembling symbol.s, and
    mips targets emit STT_OBJECT rather than STT_NOTYPE syms.
    
    	* binutils-all/strip-12.s: Align .bss section.
    	* binutils-all/strip-12.d: Adjust.
    	* binutils-all/symbols-1.d: Allow extraneous symbols.
    	* binutils-all/symbols-2.d: Likewise, and V for weakened syms.
    	* binutils-all/symbols-3.d: Likewise.
    	* binutils-all/symbols-4.d: Likewise.

commit 4b0e8a5f80441fad8eddaf68e7af70bd6991aa37
Author: Nick Clifton <nickc@redhat.com>
Date:   Tue Aug 11 11:57:09 2015 +0100

    Fix memory access problems discovered when running some binary tools on corrupt files.
    
    	PR binutils/18758
    	* elf.c (_bfd_elf_setup_sections): Add checks for corrupt section
    	group information.
    	* peicode.h (pe_ILF_make_a_section): Ensure alignment of the
    	used_by_bfd pointer.
    	(pe_ILF_build_a_bfd): Ensure alignment of vars.data pointer.

commit 64140f86ab732f9ed87beccab07c32befaf9ca52
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Aug 11 03:50:17 2015 -0700

    Fix a typo in _bfd_elf_copy_private_bfd_data
    
    	* elf.c (_bfd_elf_copy_private_bfd_data): Fix a typo.

commit eff0bc54a343fed1dd152f0a1b455b2438f76e6f
Author: Nick Clifton <nickc@redhat.com>
Date:   Tue Aug 11 10:07:21 2015 +0100

    Fix compile time warning messages about constant expressions where a value is being shifted into bit 31.
    
    	PR gas/18765
    	* config/tc-arm.c (move_or_literal_pool): Use U suffix to remove
    	compile time warnings about constant expressions being shifted
    	into bit 31.
    	(do_iwmmxt_wldstd): Likewise.
    	(do_iwmmxt_wrwrwr_or_imm5): Likewise.
    	(md_assemble): Likewise.

commit e66c3c2568fcfebc931bc18d35055c7f784133ce
Author: Nick Clifton <nickc@redhat.com>
Date:   Tue Aug 11 09:49:18 2015 +0100

    Convert 'A && (!A || B)' to 'A || B' in various places.
    
    	PR gas/18574
    	* config/tc-msp430.c (msp430_operands): Rewrite if statements to
    	remove redundant checks.
    	(md_apply_fix): Likewise.

commit d29b2a1ece30514431861472d784ae8722816a4c
Author: Nick Clifton <nickc@redhat.com>
Date:   Tue Aug 11 09:43:16 2015 +0100

    Fix typo checking MMIX operands.
    
    	PR gas/18677
    	* config/tc-mmix.c (md_assemble): Fix typo checking operands with
    	a numeric constant value.

commit 88fd0449a3f88c12c8930698a833f6c1c4478307
Author: Nick Clifton <nickc@redhat.com>
Date:   Tue Aug 11 09:40:02 2015 +0100

    Fix typo checking number of operands.
    
    	PR gas/18678
    	* config/tc-tic4x.c (tic4x_insn_check): Fix typo.

commit 2b29bb41d56d4e4ba495393f4f519718b73f92df
Author: Nick Clifton <nickc@redhat.com>
Date:   Tue Aug 11 09:36:57 2015 +0100

    Fix a typo where the same name was checked twice.
    
    	PR gas/18679
    	* config/xtensa-relax.c (same_operand_name): Fix typo.

commit 30379291886a171e6dc202122bc1c583318c2e17
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Tue Aug 11 08:51:05 2015 +0200

    PR gdb/18669 libiberty demangle.test failure: strtod() on sparc-sun-solaris2.9
    
    Test symbols did not demangle as per the d-demangle-expected tests because
    strtod() on Solaris 9 does not accept hexadecimal numbers.
    
    This has now been fixed up so that no attempt at formatting/converting the
    demangled hexadecimal literals are done.
    
    libiberty/ChangeLog:
    
    2015-08-11  Iain Buclaw  <ibuclaw@gdcproject.org>
    
    	* d-demangle.c (dlang_parse_real): Remove call to strtod.
    	(strtod): Remove declaration.
    	* testsuite/d-demangle-expected: Update float and complex literal
    	tests to check correct hexadecimal demangling.

commit 125453567f4a0abc68cfc67a3df46be1aa9bb904
Author: GDB Administrator <gdbadmin@sourceware.org>
Date:   Tue Aug 11 00:00:08 2015 +0000

    Automatic date update in version.in

commit 80af41e00325ff3e877df11d465baeaa3d565103
Author: Doug Evans <dje@google.com>
Date:   Mon Aug 10 13:36:36 2015 -0700

    remove trailing space in previous entry

commit e27852be65403306da198b3c1d7b222acd6bdfe9
Author: Doug Evans <dje@google.com>
Date:   Mon Aug 10 12:23:09 2015 -0700

    PR gdb/17960 Internal error: tracker != NULL when completing on file:function
    
    gdb/ChangeLog:
    
    	* symtab.c (make_file_symbol_completion_list_1): Renamed from
    	make_file_symbol_completion_list and made static.
    	(make_file_symbol_completion_list): New function.
    
    gdb/testsuite/ChangeLog:
    
    	* gdb.base/completion.exp: Add location completer tests.

commit fd7dcb94cbd44629b3929336aec8b76c3e339656
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Mon Aug 10 10:08:44 2015 -0700

    gdb/infrun.c: Various trivial ARI fixes.
    
    gdb/ChangeLog:
    
            * infrun.c (follow_fork, displaced_step_prepare, resume): Remove
            trailing new-line at end of warning message.
            (proceed): Add i18n marker to error messages.

commit 422f11824b3abf6c71042e2ee3aed572f250fc89
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Aug 10 07:57:40 2015 -0700

    Replace hidden with versioned in elf_link_hash_entry
    
    This patch replaces the "hidden" field with the "versioned" field in
    elf_link_hash_entry so that we can avoid calling strchr and strrchr if
    the symbol is unversioned.
    
    	* elf-bfd.h (elf_symbol_version): New enum.
    	(elf_link_hash_entry): Replace hidden with versioned.
    	* elflink.c (_bfd_elf_merge_symbol): Don't look for symbol
    	version if the symbol is unversioned.  Initialize versioned.
    	(_bfd_elf_add_default_symbol): Don't look for symbol version
    	if the symbol is unversioned or hidden.  Initialize versioned.
    	(elf_collect_hash_codes): Don't look for symbol version if the
    	symbol is unversioned.
    	(elf_collect_gnu_hash_codes): Likewise.
    	(bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
    	(_bfd_elf_link_hash_copy_indirect): Check versioned instead of
    	hidden.
    	(elf_link_output_extsym): Likewise.

commit 75fb7498c25ba89262867abe5340a8d38f1e19cd
Author: Robert Suchanek <robert.suchanek@imgtec.com>
Date:   Mon Aug 10 08:57:31 2015 +0100

    Add SIGRIE instruction for MIPS R6
    
    opcodes/
    
    	* mips-opc.c (mips_builtin_opcodes): Add "sigrie".
    
    gas/testsuite/
    
    	* gas/mips/r6.s: Add tests for "sigrie".
    	* gas/mips/r6.d: Check for "sigrie".
    	* gas/mips/r6-n32.d: Likewise.
    	* gas/mips/r6-n64.d: Likewise.

commit 2bc6d61bf3e4935921ae2612b3c6cd0604428960
Author: GDB Administrator <gdbadmin@sourceware.org>
Date:   Mon Aug 10 00:00:08 2015 +0000

    Automatic date update in version.in

commit 662a7b62c477e93284de4db127b4dbc3529caaa5
Author: GDB Administrator <gdbadmin@sourceware.org>
Date:   Sun Aug 9 00:00:07 2015 +0000

    Automatic date update in version.in

commit 8fe3f3d6afbf084f9ef36d887b661792c769f862
Author: Hans-Peter Nilsson <hp@bitrange.com>
Date:   Sat Aug 8 22:44:37 2015 +0200

    tc-arm.c: Append ULL to 0xFFFFFFFFFFFFF to avoid errors on 32-bit hosts.

commit e44bf850dff24e0442408e26043d957588be88ee
Author: GDB Administrator <gdbadmin@sourceware.org>
Date:   Sat Aug 8 00:00:08 2015 +0000

    Automatic date update in version.in

commit 0a77d46120137650c13091866cb93150910e1317
Author: Hans-Peter Nilsson <hp@bitrange.com>
Date:   Sat Aug 8 01:04:50 2015 +0200

    binutils-all/strip-12.s: Use ".section .bss" instead of ".bss"
    
    which isn't supported by all ELF targets.

commit d4ac1f878ecef58f1e4b4ff0cbfb4b475656eaf4
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Aug 7 10:28:42 2015 -0700

    Check sh_type/sh_flags/sh_addralign/sh_entsize when copying sh_link/sh_info
    
    When copying the sh_link and sh_info fields in stripped section headers,
    we also check if the sh_type, sh_flags, /sh_addralign and sh_entsize
    fields of the output section match the output.  Since --only-keep-debug
    turns all non-debug sections into SHT_NOBITS sections, the output
    SHT_NOBITS type matches any input type.
    
    bfd/
    
    	PR binutils/18785
    	* elf.c (_bfd_elf_copy_private_bfd_data): When copying the
    	sh_link and sh_info fields in stripped section headers, we also
    	check if the sh_type, sh_flags, /sh_addralign and sh_entsize
    	fields of the output section match the output.  Since
    	--only-keep-debug turns all non-debug sections into SHT_NOBITS
    	sections, the output SHT_NOBITS type matches any input type.
    
    binutils/testsuite/
    
    	PR binutils/18785
    	* binutils-all/objcopy.exp: Run strip-12.
    	* binutils-all/strip-12.d: New file.
    	* binutils-all/strip-12.s: Likewise.

commit f12899e9f081bb857c96999386e64a4252c4a325
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Aug 6 18:23:01 2015 +0100

    native Linux: enable always non-stop by default
    
    The testsuite shows no regressions with this forced on, on:
    
     - Native x86_64 Fedora 20, with and output "set displaced off".
    
     - Native x86_64 Fedora 20, on top of x86 software single-step series.
    
     - PPC64 Fedora 18.
    
     - S/390 RHEL 7.1.
    
    Let's try making it the default.
    
    gdb/ChangeLog:
    2015-08-07  Pedro Alves  <palves@redhat.com>
    
    	* linux-nat.c (linux_nat_always_non_stop_p): Return 1.

commit 5ac213430b710e8aaed1f4cea6ff809783201df9
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Aug 6 18:23:01 2015 +0100

    S/390: displaced stepping and PC-relative RIL-b/RIL-c instructions
    
    This adds displaced stepping support for the General-Instruction
    Extension Facility instructions, which have a PC-relative displacement
    (RIL-b/RIL-c).  We already handle RIL branches, but not others.
    
    Currently, displaced stepping a breakpoint put on any of these
    instructions results in the inferior crashing when or after the
    instruction is executed out-of-line in the scratch pad.
    
    This patch takes the easy route of patching the displacement in the
    copy of the instruction in the scratch pad.  As the displacement is a
    signed 32-bit field, it's possible that the stratch pad ends too far
    that the needed displacement doesn't fit in the adjusted instruction,
    as e.g., if stepping over a breakpoint in a shared library (the
    scratch pad is around the main program's entry point).  That case is
    detected and GDB falls back to stepping over the breakpoint in-line
    (which involves pausing all threads momentarily).
    
    (We could probably do something smarter, but I don't plan on doing it
    myself.  This was already sufficient to get "maint set target-non-stop
    on" working regression free on S/390.)
    
    Tested on S/390 RHEL 7.1, where it fixes a few hundred FAILs when
    testing with displaced stepping force-enabled, with the end result
    being no regressions compared to a test run that doesn't force
    displaced stepping.  Fixes the non-stop tests compared to mainline
    too; most are crashing due to this on the machine I run tests on.
    
    gdb/ChangeLog:
    2015-08-07  Pedro Alves  <palves@redhat.com>
    
    	* s390-linux-tdep.c (is_non_branch_ril)
    	(s390_displaced_step_copy_insn): New functions.
    	(s390_displaced_step_fixup): Update comment.
    	(s390_gdbarch_init): Install s390_displaced_step_copy_insn as
    	gdbarch_displaced_step_copy_insn hook.

commit 7f03bd92e389a32da490bb55037881cf374d0f69
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Aug 6 18:23:00 2015 +0100

    PPC64: Fix gdb.arch/ppc64-atomic-inst.exp with displaced stepping
    
    The ppc64 displaced step code can't handle atomic sequences.  Fallback
    to stepping over the breakpoint in-line if we detect one.
    
    gdb/ChangeLog:
    2015-08-07  Pedro Alves  <palves@redhat.com>
    
    	* infrun.c (displaced_step_prepare_throw): Return -1 if
    	gdbarch_displaced_step_copy_insn returns NULL.  Update intro
    	comment.
    	* rs6000-tdep.c (LWARX_MASK, LWARX_INSTRUCTION, LDARX_INSTRUCTION)
    	(STWCX_MASK, STWCX_INSTRUCTION, STDCX_INSTRUCTION): Move higher up
    	in file.
    	(ppc_displaced_step_copy_insn): New function.
    	(ppc_displaced_step_fixup): Update comment.
    	(rs6000_gdbarch_init): Install ppc_displaced_step_copy_insn as
    	gdbarch_displaced_step_copy_insn hook.
    	* gdbarch.sh (displaced_step_copy_insn): Document what happens on
    	NULL return.
    	* gdbarch.h: Regenerate.
    
    gdb/testsuite/ChangeLog:
    2015-08-07  Pedro Alves  <palves@redhat.com>
    
    	* gdb.arch/ppc64-atomic-inst.exp (do_test): New procedure, move
    	tests here.
    	(top level): Run do_test with and without displaced stepping.

commit 3fc8eb30a95df3fd07a63e9bd0a9d309b86a0357
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Aug 6 18:22:59 2015 +0100

    Disable displaced stepping if trying it fails
    
    Running the testsuite with "maint set target-non-stop on" shows:
    
     (gdb) PASS: gdb.base/valgrind-infcall.exp: continue #98 (false warning)
     continue
     Continuing.
     dl_main (phdr=<optimized out>..., auxv=<optimized out>) at rtld.c:2302
     2302      LIBC_PROBE (init_complete, 2, LM_ID_BASE, r);
     Cannot access memory at address 0x400532
     (gdb) PASS: gdb.base/valgrind-infcall.exp: continue #99 (false warning)
     p gdb_test_infcall ()
     $1 = 1
     (gdb) FAIL: gdb.base/valgrind-infcall.exp: p gdb_test_infcall ()
    
    Even though that was a native GNU/Linux test run, this test spawns
    Valgrind and connects to it with "target remote".  The error above is
    actually orthogonal to target-non-stop.  The real issue is that that
    enables displaced stepping, and displaced stepping doesn't work with
    Valgrind, because we can't write to the inferior memory (thus can't
    copy the instruction to the scratch pad area).
    
    I'm sure there will be other targets with the same issue, so trying to
    identify Valgrind wouldn't be sufficient.  The fix is to try setting
    up the displaced step anyway.  If we get a MEMORY_ERROR, we disable
    displaced stepping for that inferior, and fall back to doing an
    in-line step-over.  If "set displaced-stepping" is "on" (as opposed to
    "auto), GDB warns displaced stepping failed ("on" is mainly useful for
    the testsuite, not for users).
    
    Tested on x86_64 Fedora 20.
    
    gdb/ChangeLog:
    2015-08-07  Pedro Alves  <palves@redhat.com>
    
    	* inferior.h (struct inferior) <displaced_stepping_failed>: New
    	field.
    	* infrun.c (use_displaced_stepping_now_p): New parameter 'inf'.
    	Return false if dispaced stepping failed before.
    	(resume): Pass the current inferior to
    	use_displaced_stepping_now_p.  Wrap displaced_step_prepare in
    	TRY/CATCH.  If we get a MEMORY_ERROR, set the inferior's
    	displaced_stepping_failed flag, and fall back to an in-line
    	step-over.
    
    gdb/testsuite/ChangeLog:
    2015-08-07  Pedro Alves  <palves@redhat.com>
    
    	* gdb.base/valgrind-disp-step.c: New file.
    	* gdb.base/valgrind-disp-step.exp: New file.

commit d4569d7bc572ae8f10d7c527cbdfbc9d26cc1ed8
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Aug 6 18:22:59 2015 +0100

    Fix step-over-{trips-on-watchpoint|lands-on-breakpoint}.exp race
    
    On a target that is both always in non-stop mode and can do displaced
    stepping (such as native x86_64 GNU/Linux, with "maint set
    target-non-stop on"), the step-over-trips-on-watchpoint.exp test
    sometimes fails like this:
    
       (gdb) PASS: gdb.threads/step-over-trips-on-watchpoint.exp: no thread-specific bp: step: thread 1
       set scheduler-locking off
       (gdb) PASS: gdb.threads/step-over-trips-on-watchpoint.exp: no thread-specific bp: step: set scheduler-locking off
       step
      -[Switching to Thread 0x7ffff7fc0700 (LWP 11782)]
      -Hardware watchpoint 4: watch_me
      -
      -Old value = 0
      -New value = 1
      -child_function (arg=0x0) at /home/pedro/gdb/mygit/src/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.c:39
      -39           other = 1; /* set thread-specific breakpoint here */
      -(gdb) PASS: gdb.threads/step-over-trips-on-watchpoint.exp: no thread-specific bp: step: step
      +wait_threads () at /home/pedro/gdb/mygit/src/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.c:49
      +49       return 1; /* in wait_threads */
      +(gdb) FAIL: gdb.threads/step-over-trips-on-watchpoint.exp: no thread-specific bp: step: step
    
    Note "scheduler-locking" was set off.  The problem is that on such
    targets, the step-over of thread 2 and the "step" of thread 1 can be
    set to run simultaneously (since with displaced stepping the
    breakpoint isn't ever removed from the target), and sometimes, the
    "step" of thread 1 finishes first, so it'd take another resume to see
    the watchpoint trigger.  Fix this by replacing the wait_threads
    function with a one-line infinite loop that doesn't call any function,
    so that the "step" of thread 1 never finishes.
    
    gdb/testsuite/ChangeLog:
    2015-08-07  Pedro Alves  <palves@redhat.com>
    
    	* gdb.threads/step-over-lands-on-breakpoint.c (wait_threads):
    	Delete function.
    	(main): Add alarm.  Run an infinite loop instead of calling
    	wait_threads.
    	* gdb.threads/step-over-lands-on-breakpoint.exp (do_test): Change
    	comment.
    	* gdb.threads/step-over-trips-on-watchpoint.c (wait_threads):
    	Delete function.
    	(main): Add alarm.  Run an infinite loop instead of calling
    	wait_threads.
    	* gdb.threads/step-over-trips-on-watchpoint.exp (do_test): Change
    	comment.

commit bfedc46af315dc6484295699c35e05040d76d700
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Aug 6 18:22:58 2015 +0100

    Fix interrupt-noterm.exp on targets always in non-stop
    
    With "maint set target-non-stop on" we get:
    
     @@ -66,13 +66,16 @@ Continuing.
      interrupt
      (gdb) PASS: gdb.base/interrupt-noterm.exp: interrupt
    
     -Program received signal SIGINT, Interrupt.
     -PASS: gdb.base/interrupt-noterm.exp: inferior received SIGINT
     -testcase src/gdb/testsuite/gdb.base/interrupt-noterm.exp completed in 0 seconds
     +[process 12119] #1 stopped.
     +0x0000003615ebc6d0 in __nanosleep_nocancel () at ../sysdeps/unix/syscall-template.S:81
     +81     T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
     +FAIL: gdb.base/interrupt-noterm.exp: inferior received SIGINT (timeout)
     +testcase src/gdb/testsuite/gdb.base/interrupt-noterm.exp completed in 10 seconds
    
    That is, we get "[$thread] #1 stopped" instead of SIGINT.
    
    The issue is that we don't currently distinguish send
    "interrupt/ctrl-c" to target terminal vs "stop/pause" thread well;
    both cases go through "target_stop".
    
    And then, the native Linux backend (linux-nat.c) implements
    target_stop with SIGSTOP in non-stop mode, and SIGINT in all-stop
    mode.  Since "maint set target-non-stop on" forces the backend to be
    always running in non-stop mode, even though the user-visible behavior
    is "set non-stop" is "off", "interrupt" causes a SIGSTOP instead of
    the SIGINT the test expects.
    
    Fix this by introducing a target_interrupt method to use in the
    "interrupt/ctrl-c" case, so "set non-stop off" can always work the
    same irrespective of "maint set target-non-stop on/off".  I'm
    explictly considering changing the "set non-stop on" behavior as out
    of scope here.
    
    Most of the patch is an across-the-board rename of to_stop hook
    implementations to to_interrupt.  The only targets where something
    more than a rename is being done are linux-nat.c and remote.c, which
    are the only targets that support async, and thus are the only ones
    the core side calls target_stop on.
    
    gdb/ChangeLog:
    2015-08-07  Pedro Alves  <palves@redhat.com>
    
    	* darwin-nat.c (darwin_stop): Rename to ...
    	(darwin_interrupt): ... this.
    	(_initialize_darwin_inferior): Adjust.
    	* gnu-nat.c (gnu_stop): Delete.
    	(gnu_target): Don't install gnu_stop.
    	* inf-ptrace.c (inf_ptrace_stop): Rename to ...
    	(inf_ptrace_interrupt): ... this.
    	(inf_ptrace_target): Adjust.
    	* infcmd.c (interrupt_target_1): Use target_interrupt instead of
    	target_stop.
    	* linux-nat (linux_nat_stop): Rename to ...
    	(linux_nat_interrupt): ... this.
    	(linux_nat_stop): Reimplement.
    	(linux_nat_add_target): Install linux_nat_interrupt.
    	* nto-procfs.c (nto_interrupt_twice): Rename to ...
    	(nto_handle_sigint_twice): ... this.
    	(nto_interrupt): Rename to ...
    	(nto_handle_sigint): ... this.  Call target_interrupt instead of
    	target_stop.
    	(procfs_wait): Adjust.
    	(procfs_stop): Rename to ...
    	(procfs_interrupt): ... this.
    	(init_procfs_targets): Adjust.
    	* procfs.c (procfs_stop): Rename to ...
    	(procfs_interrupt): ... this.
    	(procfs_target): Adjust.
    	* remote-m32r-sdi.c (m32r_stop): Rename to ...
    	(m32r_interrupt): ... this.
    	(init_m32r_ops): Adjust.
    	* remote-sim.c (gdbsim_stop_inferior): Rename to ...
    	(gdbsim_interrupt_inferior): ... this.
    	(gdbsim_stop): Rename to ...
    	(gdbsim_interrupt): ... this.
    	(gdbsim_cntrl_c): Adjust.
    	(init_gdbsim_ops): Adjust.
    	* remote.c (sync_remote_interrupt): Adjust comments.
    	(remote_stop_as): Rename to ...
    	(remote_interrupt_as): ... this.
    	(remote_stop): Adjust comment.
    	(remote_interrupt): New function.
    	(init_remote_ops): Install remote_interrupt.
    	* target.c (target_interrupt): New function.
    	* target.h (struct target_ops) <to_interrupt>: New field.
    	(target_interrupt): New declaration.
    	* windows-nat.c (windows_stop): Rename to ...
    	(windows_interrupt): ... this.
    	* target-delegates.c: Regenerate.

commit d55007b58352c0b5fd2817e003b6dcf4e3ee4c07
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Aug 6 18:22:57 2015 +0100

    Fix signal-while-stepping-over-bp-other-thread.exp on targets always in non-stop
    
    With "maint set target-non-stop on" we get:
    
     -PASS: gdb.threads/signal-while-stepping-over-bp-other-thread.exp: step
     +FAIL: gdb.threads/signal-while-stepping-over-bp-other-thread.exp: step
    
    The issue is simply that switch_back_to_stepped_thread is not used in
    non-stop mode, thus infrun doesn't output the expected "switching back
    to stepped thread" log.
    
    gdb/testsuite/ChangeLog:
    2015-08-07  Pedro Alves  <palves@redhat.com>
    
    	* signal-while-stepping-over-bp-other-thread.exp: Expect "restart
    	threads" as alternative to "switching back to stepped thread".

commit fbea99ea8a062e5cd96e2d88336984ed3adc93d4
Author: Pedro Alves <palves@redhat.com>
Date:   Fri Aug 7 17:24:01 2015 +0100

    Implement all-stop on top of a target running non-stop mode
    
    This finally implements user-visible all-stop mode running with the
    target_ops backend always in non-stop mode.  This is a stepping stone
    towards finer-grained control of threads, being able to do interesting
    things like thread groups, associating groups with breakpoints, etc.
    From the user's perspective, all-stop mode is really just a special
    case of being able to stop and resume specific sets of threads, so it
    makes sense to do this step first.
    
    With this, even in all-stop, the target is no longer in charge of
    stopping all threads before reporting an event to the core -- the core
    takes care of it when it sees fit.  For example, when "next"- or
    "step"-ing, we can avoid stopping and resuming all threads at each
    internal single-step, and instead only stop all threads when we're
    about to present the stop to the user.
    
    The implementation is almost straight forward, as the heavy lifting
    has been done already in previous patches.  Basically, we replace
    checks for "set non-stop on/off" (the non_stop global), with calls to
    a new target_is_non_stop_p function.  In a few places, if "set
    non-stop off", we stop all threads explicitly, and in a few other
    places we resume all threads explicitly, making use of existing
    methods that were added for teaching non-stop to step over breakpoints
    without displaced stepping.
    
    This adds a new "maint set target-non-stop on/off/auto" knob that
    allows both disabling the feature if we find problems, and
    force-enable it for development (useful when teaching a target about
    this.  The default is "auto", which means the feature is enabled if a
    new target method says it should be enabled.  The patch implements the
    method in linux-nat.c, just for illustration, because it still returns
    false.  We'll need a few follow up fixes before turning it on by
    default.  This is a separate target method from indicating regular
    non-stop support, because e.g., while e.g., native linux-nat.c is
    close to regression free with all-stop-non-stop (with following
    patches will fixing the remaining regressions), remote.c+gdbserver
    will still need more fixing, even though it supports "set non-stop
    on".
    
    Tested on x86_64 Fedora 20, native, with and without "set displaced
    off", and with and without "maint set target-non-stop on"; and also
    against gdbserver.
    
    gdb/ChangeLog:
    2015-08-07  Pedro Alves  <palves@redhat.com>
    
    	* NEWS: Mention "maint set/show target-non-stop".
    	* breakpoint.c (update_global_location_list): Check
    	target_is_non_stop_p instead of non_stop.
    	* infcmd.c (attach_command_post_wait, attach_command): Likewise.
    	* infrun.c (show_can_use_displaced_stepping)
    	(can_use_displaced_stepping_p, start_step_over_inferior):
    	Likewise.
    	(internal_resume_ptid): New function.
    	(resume): Use it.
    	(proceed): Check target_is_non_stop_p instead of non_stop.  If in
    	all-stop mode but the target is always in non-stop mode, start all
    	the other threads that are implicitly resumed too.
    	(for_each_just_stopped_thread, fetch_inferior_event)
    	(adjust_pc_after_break, stop_all_threads): Check
    	target_is_non_stop_p instead of non_stop.
    	(handle_inferior_event): Likewise.  Handle detach-fork in all-stop
    	with the target always in non-stop mode.
    	(handle_signal_stop) <random signal>: Check target_is_non_stop_p
    	instead of non_stop.
    	(switch_back_to_stepped_thread): Check target_is_non_stop_p
    	instead of non_stop.
    	(keep_going_stepped_thread): Use internal_resume_ptid.
    	(stop_waiting): If in all-stop mode, and the target is in non-stop
    	mode, stop all threads.
    	(keep_going_pass): Likewise, when starting a new in-line step-over
    	sequence.
    	* linux-nat.c (get_pending_status, select_event_lwp)
    	(linux_nat_filter_event, linux_nat_wait_1, linux_nat_wait): Check
    	target_is_non_stop_p instead of non_stop.
    	(linux_nat_always_non_stop_p): New function.
    	(linux_nat_stop): Check target_is_non_stop_p instead of non_stop.
    	(linux_nat_add_target): Install linux_nat_always_non_stop_p.
    	* target-delegates.c: Regenerate.
    	* target.c (target_is_non_stop_p): New function.
    	(target_non_stop_enabled, target_non_stop_enabled_1): New globals.
    	(maint_set_target_non_stop_command)
    	(maint_show_target_non_stop_command): New functions.
    	(_initilize_target): Install "maint set/show target-non-stop"
    	commands.
    	* target.h (struct target_ops) <to_always_non_stop_p>: New field.
    	(target_non_stop_enabled): New declaration.
    	(target_is_non_stop_p): New declaration.
    
    gdb/doc/ChangeLog:
    2015-08-07  Pedro Alves  <palves@redhat.com>
    
    	* gdb.texinfo (Maintenance Commands): Document "maint set/show
    	target-non-stop".

commit 372316f12874a30c62e6d71079ca3b86c786fb7e
Author: Pedro Alves <palves@redhat.com>
Date:   Fri Aug 7 17:24:00 2015 +0100

    Teach non-stop to do in-line step-overs (stop all, step, restart)
    
    That is, step past breakpoints by:
    
     - pausing all threads
     - removing breakpoint at PC
     - single-step
     - reinsert breakpoint
     - restart threads
    
    similarly to all-stop (with displaced stepping disabled).  This allows
    non-stop to work on targets/architectures without displaced stepping
    support.  That is, it makes displaced stepping an optimization instead
    of a requirement.  For example, in principle, all GNU/Linux ports
    support non-stop mode at the target_ops level, but not all
    corresponding gdbarch's implement displaced stepping.  This should
    make non-stop work for all (albeit, not as efficiently).  And then
    there are scenarios where even if the architecture supports displaced
    stepping, we can't use it, because we e.g., don't find a usable
    address to use as displaced step scratch pad.  It should also fix
    stepping past watchpoints on targets that have non-continuable
    watchpoints in non-stop mode (e.g., PPC, untested).  Running the
    instruction out of line in the displaced stepping scratch pad doesn't
    help that case, as the copied instruction reads/writes the same
    watched memory...  We can fix that too by teaching GDB to only remove
    the watchpoint from the thread that we want to move past the
    watchpoint (currently, removing a watchpoint always removes it from
    all threads), but again, that can be considered an optimization; not
    all targets would support it.
    
    For those familiar with the gdb and gdbserver Linux target_ops
    backends, the implementation should look similar, except it is done on
    the core side.  When we pause threads, we may find they stop with an
    interesting event that should be handled later when the thread is
    re-resumed, thus we store such events in the thread object, and mark
    the event as pending.  We should only consume pending events if the
    thread is indeed resumed, thus we add a new "resumed" flag to the
    thread object.  At a later stage, we might add new target methods to
    accelerate some of this, like "pause all threads", with corresponding
    RSP packets, but we'd still need a fallback method for remote targets
    that don't support such packets, so, again, that can be deferred as
    optimization.
    
    My _real_ motivation here is making it possible to reimplement
    all-stop mode on top of the target always working on non-stop mode, so
    that e.g., we can send RSP packets to a remote target even while the
    target is running -- can't do that in the all-stop RSP variant, by
    design).
    
    Tested on x86_64 Fedora 20, with and without "set displaced off"
    forced.  The latter forces the new code paths whenever GDB needs to
    step past a breakpoint.
    
    gdb/ChangeLog:
    2015-08-07  Pedro Alves  <pedro@codesourcery.com>
    
    	* breakpoint.c (breakpoints_should_be_inserted_now): If any thread
    	has a pending status, return true.
    	* gdbthread.h: Include target/waitstatus.h.
    	(struct thread_suspend_state) <stop_reason, waitstatus_pending_p,
    	stop_pc>: New fields.
    	(struct thread_info) <resumed>: New field.
    	(set_resumed): Declare.
    	* infrun.c: Include "event-loop.h".
    	(infrun_async_inferior_event_token, infrun_is_async): New globals.
    	(infrun_async): New function.
    	(clear_step_over_info): Add debug output.
    	(displaced_step_in_progress_any_inferior): New function.
    	(displaced_step_fixup): New returns int.
    	(start_step_over): Handle in-line step-overs too.  Assert the
    	thread is marked resumed.
    	(resume_cleanups): Clear the thread's resumed flag.
    	(resume): Set the thread's resumed flag.  Return early if the
    	thread has a pending status.  Allow stepping a breakpoint with no
    	signal.
    	(proceed): Adjust to check 'resumed' instead of 'executing'.
    	(clear_proceed_status_thread): If the thread has a pending status,
    	and that status is a finished step, discard the pending status.
    	(clear_proceed_status): Don't clear step_over_info here.
    	(random_pending_event_thread, do_target_wait): New functions.
    	(prepare_for_detach, wait_for_inferior, fetch_inferior_event): Use
    	do_target_wait.
    	(wait_one): New function.
    	(THREAD_STOPPED_BY): New macro.
    	(thread_stopped_by_watchpoint, thread_stopped_by_sw_breakpoint)
    	(thread_stopped_by_hw_breakpoint): New functions.
    	(switch_to_thread_cleanup, save_waitstatus, stop_all_threads): New
    	functions.
    	(handle_inferior_event): Also call set_resumed(false) on all
    	threads implicitly stopped by the event.
    	(restart_threads, resumed_thread_with_pending_status): New
    	functions.
    	(finish_step_over): If we were doing an in-line step-over before,
    	and no longer are after trying to start a new step-over, restart
    	all threads.  If we have multiple threads with pending events,
    	save the current event and go through the event loop again.
    	(handle_signal_stop): Return early if finish_step_over returns
    	false.
    	<random signal>: If we get a signal while stepping over a
    	breakpoint in-line in non-stop mode, restart all threads.  Clear
    	step_over_info before delivering the signal.
    	(keep_going_stepped_thread): Use internal_error instead of
    	gdb_assert.  Mark the thread as resumed.
    	(keep_going_pass_signal): Assert the thread isn't already resumed.
    	If some other thread is doing an in-line step-over, defer the
    	resume.  If we just started a new in-line step-over, stop all
    	threads.  Don't clear step_over_info.
    	(infrun_async_inferior_event_handler): New function.
    	(_initialize_infrun): Create async event handler with
    	infrun_async_inferior_event_handler as callback.
    	(infrun_async): New declaration.
    	* target.c (target_async): New function.
    	* target.h (target_async): Declare macro and readd as function
    	declaration.
    	* target/waitstatus.h (enum target_stop_reason)
    	<TARGET_STOPPED_BY_SINGLE_STEP>: New value.
    	* thread.c (new_thread): Clear the new waitstatus field.
    	(set_resumed): New function.

commit 2ac7589cfe1df06506adb133e99b2b89212c9a11
Author: Pedro Alves <palves@redhat.com>
Date:   Fri Aug 7 17:23:59 2015 +0100

    Factor out code to re-resume stepped thread
    
    Just a code refactor, no funcionality change intended.
    
    gdb/ChangeLog:
    2015-08-07  Pedro Alves  <palves@redhat.com>
    
    	* infrun.c (keep_going_stepped_thread): New function, factored out
    	from ...
    	(switch_back_to_stepped_thread): ... here.

commit 8b0615634896718c982d367a01ec61120084d3fb
Author: Pedro Alves <palves@redhat.com>
Date:   Fri Aug 7 17:23:59 2015 +0100

    Add comments to currently_stepping and target_resume
    
    Clarify that currently_stepping works at a higher level than
    target_resume.
    
    gdb/ChangeLog:
    2015-08-07  Pedro Alves  <palves@redhat.com>
    
    	* infrun.c (currently_stepping): Extend intro comment.
    	* target.h (target_resume): Extend intro comment.

commit 1afd5965eda86caed3af7f23fd1f8802831360b6
Author: Pedro Alves <palves@redhat.com>
Date:   Fri Aug 7 17:23:58 2015 +0100

    Misc switch_back_to_stepped_thread cleanups
    
    Several misc cleanups that prepare the tail end of this function, the
    part that actually re-resumes the stepped thread.
    
    The most non-obvious would be the currently_stepping change, I guess.
    That's because it isn't ever correct to pass step=1 to target_resume
    on software single-step targets, and currently_stepping works at a
    conceptual higher level, it returns step=true even on software step
    targets.  It doesn't really matter on hardware step targets, as the
    breakpoint will be hit immediately, but it's just wrong on software
    step targets.  I tested it against my x86 software single-step branch,
    and it indeed fixes failed assertions (that catch spurious
    PTRACE_SINGLESTEP requests) there.
    
    gdb/ChangeLog:
    2015-08-07  Pedro Alves  <palves@redhat.com>
    
    	* infrun.c (switch_back_to_stepped_thread): Use ecs->ptid instead
    	of inferior_ptid.  If the stepped thread vanished, return 0
    	instead of resuming here.  Use reset_ecs.  Print the prev_pc and
    	the current stop_pc in log message.  Clear trap_expected if the
    	thread advanced.  Don't pass currently_stepping to
    	do_target_resume.

commit 4d9d9d0423ed611fa6d620ca3aa088fc16a0d59e
Author: Pedro Alves <palves@redhat.com>
Date:   Fri Aug 7 17:23:58 2015 +0100

    Use keep_going in proceed and start_step_over too
    
    The main motivation of this patch is sharing more code between the
    proceed (starting the inferior for the first time) and keep_going
    (restarting the inferior after handling an event) paths and using the
    step_over_chain queue now embedded in the thread_info object for
    pending in-line step-overs too (instead of just for displaced
    stepping).
    
    So this commit:
    
     - splits out a new keep_going_pass_signal function out of keep_going
       that is just like keep_going except for the bits that clear the
       signal to pass if the signal is set to "handle nopass".
    
     - makes proceed use keep_going too.
    
     - Makes start_step_over use keep_going_pass_signal instead of lower
       level displaced stepping things.
    
    One user visible change: if inserting breakpoints while trying to
    proceed fails, we now get:
    
      (gdb) si
      Warning:
      Could not insert hardware watchpoint 7.
      Could not insert hardware breakpoints:
      You may have requested too many hardware breakpoints/watchpoints.
    
      Command aborted.
      (gdb)
    
    while before we only saw warnings with no indication that the command
    was cancelled:
    
      (gdb) si
      Warning:
      Could not insert hardware watchpoint 7.
      Could not insert hardware breakpoints:
      You may have requested too many hardware breakpoints/watchpoints.
    
      (gdb)
    
    Tested on x86_64-linux-gnu, ppc64-linux-gnu and s390-linux-gnu.
    
    gdb/ChangeLog:
    2015-08-07  Pedro Alves  <palves@redhat.com>
    
    	* gdbthread.h (struct thread_info) <prev_pc>: Extend comment.
    	* infrun.c (struct execution_control_state): Move higher up in the
    	file.
    	(reset_ecs): New function.
    	(start_step_over): Now returns int.  Rewrite to use
    	keep_going_pass_signal instead of manually starting a displaced step.
    	(resume): Don't call set_running here.  If displaced stepping
    	can't start now, clear trap_expected.
    	(find_thread_needs_step_over): Delete function.
    	(proceed): Set up finish_thread_state_cleanup.  Call set_running.
    	If the current thread needs a step over, push it in the step-over
    	chain.  Don't set insert breakpoints nor call resume directly
    	here.  Instead rewrite to use start_step_over and
    	keep_going_pass_signal.
    	(finish_step_over): New function.
    	(handle_signal_stop): Call finish_step_over instead of
    	start_step_over.
    	(switch_back_to_stepped_thread): If the event thread needs another
    	step-over do that first.  Use start_step_over.
    	(keep_going_pass_signal): New function, factored out from ...
    	(keep_going): ... here.
    	(_initialize_infrun): Comment moved here.
    	* thread.c (set_running_thread): New function.
    	(set_running, finish_thread_state): Use set_running_thread.

commit c2829269f5af8a860b54ceac3596610b1f51fee5
Author: Pedro Alves <palves@redhat.com>
Date:   Fri Aug 7 17:23:57 2015 +0100

    Embed the pending step-over chain in thread_info objects
    
    In order to teach non-stop mode to do in-line step-overs (pause all
    threads, remove breakpoint, single-step, reinsert breakpoint, restart
    threads), we'll need to be able to queue in-line step over requests,
    much like we queue displaced stepping (out-of-line) requests.
    Actually, the queue should be the same -- threads wait for their turn
    to step past something (breakpoint, watchpoint), doesn't matter what
    technique we end up using when the step over actually starts.
    
    I found that the queue management ends up simpler and more efficient
    if embedded in the thread objects themselves.  This commit converts
    the existing displaced stepping queue to that.  Later patches will
    make the in-line step-overs code paths use it too.
    
    gdb/ChangeLog:
    2015-08-07  Pedro Alves  <palves@redhat.com>
    
    	* gdbthread.h (struct thread_info) <step_over_prev,
    	step_over_next>: New fields.
    	(thread_step_over_chain_enqueue, thread_step_over_chain_remove)
    	(thread_step_over_chain_next, thread_is_in_step_over_chain): New
    	declarations.
    	* infrun.c (struct displaced_step_request): Delete.
    	(struct displaced_step_inferior_state) <step_request_queue>:
    	Delete field.
    	(displaced_step_prepare): Assert that trap_expected is set.  Use
    	thread_step_over_chain_enqueue.  Split starting a new displaced
    	step to ...
    	(start_step_over): ... this new function.
    	(resume): Assert the thread isn't waiting for a step over already.
    	(proceed): Assert the thread isn't waiting for a step over
    	already.
    	(infrun_thread_stop_requested): Adjust to remove threads from the
    	embedded step-over chain.
    	(handle_inferior_event) <fork/vfork>: Call start_step_over after
    	displaced_step_fixup.
    	(handle_signal_stop): Call start_step_over after
    	displaced_step_fixup.
    	* infrun.h (step_over_queue_head): New declaration.
    	* thread.c (step_over_chain_enqueue, step_over_chain_remove)
    	(thread_step_over_chain_next, thread_is_in_step_over_chain)
    	(thread_step_over_chain_enqueue)
    	(thread_step_over_chain_remove): New functions.
    	(delete_thread_1): Remove thread from the step-over chain.

commit 6c4cfb244b408f980be24ea2175bc58baf74a6f9
Author: Pedro Alves <palves@redhat.com>
Date:   Fri Aug 7 17:23:57 2015 +0100

    Make thread_still_needs_step_over consider stepping_over_watchpoint too
    
    I noticed that even though keep_going knows to start a step over for a
    watchpoint, thread_still_needs_step_over forgets it.
    
    gdb/ChangeLog:
    2015-08-07  Pedro Alves  <palves@redhat.com>
    
    	* infrun.c (thread_still_needs_step_over): Rename to ...
    	(thread_still_needs_step_over_bp): ... this.
    	(enum step_over_what): New.
    	(thread_still_needs_step_over): Reimplement.

commit 567420d10895611e03d5ee65e6b24c16a69a6e99
Author: Pedro Alves <palves@redhat.com>
Date:   Fri Aug 7 17:23:56 2015 +0100

    remote.c/all-stop: Implement TARGET_WAITKIND_NO_RESUMED and TARGET_WNOHANG
    
    Even though "target remote" supports target-async, the all-stop
    target_wait implementation ignores TARGET_WNOHANG.  If the core
    happens to poll for events and we've already read the stop reply out
    of the serial/socket, remote_wait_as hangs forever instead of
    returning an indication that there are no events to process.  This
    can't happen currently, but later changes will trigger this.
    
    gdb/ChangeLog:
    2015-08-07  Pedro Alves  <palves@redhat.com>
    
    	* remote.c (remote_wait_as): If not waiting for a stop reply,
    	return TARGET_WAITKIND_NO_RESUMED.  If TARGET_WNOHANG is
    	requested, don't block waiting forever.

commit d8dd4d5fe6d5ab971b731df5f65025a0dbbdb912
Author: Pedro Alves <palves@redhat.com>
Date:   Fri Aug 7 17:23:56 2015 +0100

    Change adjust_pc_after_break's prototype
    
    Prepare to use it in contexts without an ecs handy.  Follow up patches
    will make use of this.
    
    gdb/ChangeLog:
    2015-08-07  Pedro Alves  <pedro@codesourcery.com>
    
    	* infrun.c (adjust_pc_after_break): Now takes thread_info and
    	waitstatus pointers instead of an ecs.  Adjust.
    	(handle_inferior_event): Adjust caller.

commit e1316e60d4d1fe406efc6e7536b2bdb43733e9d2
Author: Pedro Alves <palves@redhat.com>
Date:   Fri Aug 7 17:23:55 2015 +0100

    Fix and test "checkpoint" in non-stop mode
    
    Letting a "checkpoint" run to exit with "set non-stop on" behaves
    differently compared to the default all-stop mode ("set non-stop
    off").
    
    Currently, in non-stop mode:
    
      (gdb) start
      Temporary breakpoint 1 at 0x40086b: file src/gdb/testsuite/gdb.base/checkpoint.c, line 28.
      Starting program: build/gdb/testsuite/gdb.base/checkpoint
    
      Temporary breakpoint 1, main () at src/gdb/testsuite/gdb.base/checkpoint.c:28
      28        char *tmp = &linebuf[0];
      (gdb) checkpoint
      checkpoint 1: fork returned pid 24948.
      (gdb) c
      Continuing.
      Copy complete.
      Deleting copy.
      [Inferior 1 (process 24944) exited normally]
      [Switching to process 24948]
      (gdb) info threads
        Id   Target Id         Frame
        1    process 24948 "checkpoint" (running)
    
      No selected thread.  See `help thread'.
      (gdb) c
      The program is not being run.
      (gdb)
    
    Two issues above:
    
     1. Thread 1 got stuck in "(running)" state (it isn't really running)
    
     2. While checkpoints try to preserve the illusion that the thread is
        still the same when the process exits, GDB switched to "No thread
        selected." instead of staying with thread 1 selected.
    
    Problem #1 is caused by handle_inferior_event and normal_stop not
    considering that when a
    TARGET_WAITKIND_SIGNALLED/TARGET_WAITKIND_EXITED event is reported,
    and the inferior is mourned, the target may still have execution.
    
    Problem #2 is caused by the make_cleanup_restore_current_thread
    cleanup installed by fetch_inferior_event not being able to find the
    original thread 1's ptid in the thread list, thus not being able to
    restore thread 1 as selected thread.  The fix is to make the cleanup
    installed by make_cleanup_restore_current_thread aware of thread ptid
    changes, by installing a thread_ptid_changed observer that adjusts the
    cleanup's data.
    
    After the patch, we get the same in all-stop and non-stop modes:
    
      (gdb) c
      Continuing.
      Copy complete.
      Deleting copy.
      [Inferior 1 (process 25109) exited normally]
      [Switching to process 25113]
      (gdb) info threads
        Id   Target Id         Frame
      * 1    process 25113 "checkpoint" main () at src/gdb/testsuite/gdb.base/checkpoint.c:28
      (gdb)
    
    Turns out the whole checkpoints.exp file can run in non-stop mode
    unmodified.  I thought of moving most of the test file's contents to a
    procedure that can be called twice, once in non-stop mode and another
    in all-stop mode.  But then, the test already takes close to 30
    seconds to run on my machine, so I thought it'd be nicer to run
    all-stop and non-stop mode in parallel.  Thus I added a new
    checkpoint-ns.exp file that just appends "set non-stop on" to GDBFLAGS
    and sources checkpoint.exp.
    
    gdb/ChangeLog:
    2015-08-07  Pedro Alves  <palves@redhat.com>
    
    	* infrun.c (handle_inferior_event): If we get
    	TARGET_WAITKIND_SIGNALLED or TARGET_WAITKIND_EXITED in non-stop
    	mode, mark all threads of the exiting process as not-executing.
    	(normal_stop): If we get TARGET_WAITKIND_SIGNALLED or
    	TARGET_WAITKIND_EXITED in non-stop mode, finish all threads of the
    	exiting process, if inferior_ptid still points at a process.
    	* thread.c (struct current_thread_cleanup) <next>: New field.
    	(current_thread_cleanup_chain): New global.
    	(restore_current_thread_ptid_changed): New function.
    	(restore_current_thread_cleanup_dtor): Remove the cleanup from the
    	current_thread_cleanup_chain list.
    	(make_cleanup_restore_current_thread): Add the cleanup data to the
    	current_thread_cleanup_chain list.
    	(_initialize_thread): Install restore_current_thread_ptid_changed
    	as thread_ptid_changed observer.
    
    gdb/testsuite/ChangeLog:
    2015-08-07  Pedro Alves  <palves@redhat.com>
    
    	* gdb.base/checkpoint-ns.exp: New file.
    	* gdb.base/checkpoint.exp: Pass explicit "checkpoint.c" to
    	standard_testfile.

commit 47e9c225c1cb6fb1809218f5f546a70fc85f705c
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Thu Aug 6 22:13:32 2015 +0200

    ignore invalid DOF provider sections
    
    On x86-solaris 10, we noticed that starting a program would sometimes
    cause the debugger to crash. For instance:
    
        % gdb a
        (gdb) break adainit
        Breakpoint 1 at 0x8051f03
        (gdb) run
        Starting program: /[...]/a
        [Thread debugging using libthread_db enabled]
        zsh: 24398 segmentation fault (core dumped)  /[...]/gdb a
    
    The exception occurs in dtrace_process_dof_probe, while trying
    to process each probe referenced by a DTRACE_DOF_SECT_TYPE_PROVIDER
    DOF section from /lib/libc.so.1. For reference, the ELF section
    in that shared library providing the DOF data has the following
    characteristics:
    
        Idx Name          Size      VMA       LMA       File off  Algn
         14 .SUNW_dof     0000109d  000b4398  000b4398  000b4398  2**3
                          CONTENTS, ALLOC, LOAD, READONLY, DATA
    
    The function dtrace_process_dof gets passed the contents of that
    ELF section, which allows it to determine the location of the table
    where all DOF sections are described. I dumped the contents of
    each DOF section as seen by GDB, and it seemed to be plausible,
    because the offset of each DOF section was pretty much equal to
    the sum of the offset and size of the previous DOF section. Also,
    the offset + sum of the last section corresponds to the size of
    the .SUNW_dof section.
    
    Things start to break down when processing one of the DOF sections
    that has a type of DTRACE_DOF_SECT_TYPE_PROVIDER. It gets the contents
    of this DOF section via:
    
            struct dtrace_dof_provider *provider = (struct dtrace_dof_provider *)
              DTRACE_DOF_PTR (dof, DOF_UINT (dof, section->dofs_offset));
    
    Said more simply, the struct dtrace_dof_provider data is at
    section->dofs_offset of the entire DOF contents. Given that
    the contents of SECTION seemed to make sense, so far so good.
    
    However, what SECTION tells us is that our DOF provider section
    is 40 bytes long:
    
        (gdb) print *section
        $36 = {dofs_type = 15, dofs_align = 4, dofs_flags = 1,
               dofs_entsize = 0, dofs_offset = 3264, dofs_size = 40}
                                                     ^^^^^^^^^^^^^^
    
    But on the other hand:
    
        (gdb) p sizeof (struct dtrace_dof_provider)
        $54 = 44
    
    In other words GDB expected a bigger DOF section and when we try to
    fetch the value of the last field of that DOF section (dofpv_prenoffs)...
    
        eoffsets_s = DTRACE_DOF_SECT (dof,
                                      DOF_UINT (dof, provider->dofpv_prenoffs));
    
    ... we end up reading data that actually belongs to another DOF
    section, and therefore irrelevant. This in turn means that the value
    of eofftab gets incorrectly set, since it depends on eoffsets_s:
    
        eofftab = DTRACE_DOF_PTR (dof, DOF_UINT (dof, eoffsets_s->dofs_offset));
    
    This invalid address quickly catches up to us when we pass it to
    dtrace_process_dof_probe shortly after, where we crash because
    we try to subscript it:
    
        Program received signal SIGSEGV, Segmentation fault.
        0x08155bba in dtrace_process_dof_probe ([...]) at [...]/dtrace-probe.c:378
        378             = ((uint32_t *) eofftab)[...];
    
    This patch fixes the issue by detecting provider DOF sections
    that are smaller than expected, and discarding the DOF data.
    
    gdb/ChangeLog:
    
            * dtrace-probe.c (dtrace_process_dof): Ignore the objfile's DOF
            data if a DTRACE_DOF_SECT_TYPE_PROVIDER section is found to be
            smaller than expected.

commit 5960642af99c6dc84b28e1bc69a617099b9dee97
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Aug 7 07:51:39 2015 -0700

    Sync config.sub and config.guess with GCC
    
    	Sync with GCC
    	2015-07-28  Ben Elliston  <bje@gnu.org>
    
    	* config.sub, config.guess: Import from upstream.

commit 36aed29d3774a156c88ca7110f3c12605d861b9c
Author: Amit Pawar <Amit.Pawar@amd.com>
Date:   Fri Aug 7 19:50:58 2015 +0530

    Remove CpuFMA4 support from CPU_ZNVER1_FLAGS.
    
    opcodes/
    
    	* i386-gen.c: Remove CpuFMA4 from CPU_ZNVER1_FLAGS.
    	* i386-init.h: Regenerated.

commit 6e33951edcbed1fd803beabcde2af3b252b92164
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Aug 7 05:04:21 2015 -0700

    Properly merge hidden versioned symbol
    
    The hidden versioned symbol can only be merged with the versioned
    symbol with the same symbol version.  _bfd_elf_merge_symbol should
    check the symbol version before merging the new hidden versioned
    symbol with the existing symbol.  _bfd_elf_link_hash_copy_indirect can't
    copy any references to the hidden versioned symbol.   We need to
    bind a symbol locally when linking executable if it is locally defined,
    hidden versioned, not referenced by shared library and not exported.
    
    bfd/
    
    	PR ld/18720
    	* elflink.c (_bfd_elf_merge_symbol): Add a parameter to indicate
    	if the new symbol matches the existing one.  The new hidden
    	versioned symbol matches the existing symbol if they have the
    	same symbol version. Update the existing symbol only if they
    	match.
    	(_bfd_elf_add_default_symbol): Update call to
    	_bfd_elf_merge_symbol.
    	(_bfd_elf_link_assign_sym_version): Don't set the hidden field
    	here.
    	(elf_link_add_object_symbols): Override a definition only if the
    	new symbol matches the existing one.
    	(_bfd_elf_link_hash_copy_indirect): Don't copy any references to
    	the hidden versioned symbol.
    	(elf_link_output_extsym): Bind a symbol locally when linking
    	executable if it is locally defined, hidden versioned, not
    	referenced by shared library and not exported.  Turn on
    	VERSYM_HIDDEN only if the hidden vesioned symbol is defined
    	locally.
    
    ld/testsuite/
    
    	PR ld/18720
    	* ld-elf/indirect.exp: Run tests for PR ld/18720.
    	* ld-elf/pr18720.out: New file.
    	* ld-elf/pr18720a.c: Likewise.
    	* ld-elf/pr18720b.c: Likewise.
    	* ld-elf/pr18720c.c: Likewise.

commit 060967202b8def804d9afccad343d2eaef8a81cf
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Date:   Tue Aug 4 15:42:03 2015 +0100

    gdb: Move get_frame_language from stack.c to frame.c.
    
    The get_frame_language feels like it would be more at home in frame.c
    rather than in stack.c, while the declaration, that is currently in
    language.h can be moved into frame.h to match.
    
    A couple of new includes are added, but otherwise no substantial change
    here.
    
    gdb/ChangeLog:
    
    	* stack.c (get_frame_language): Moved ...
    	* frame.c (get_frame_language): ... to here.
    	* language.h (get_frame_language): Declaration moved to frame.h.
    	* frame.h: Add language.h include, for language enum.
    	(get_frame_language): Declaration moved from language.h.
    	* language.c: Add frame.h include.
    	* top.c: Add frame.h include.
    	* symtab.h (struct obj_section): Declare.
    	(struct cmd_list_element): Declare.

commit 7ff38b1c898be5db053193f26d6a3a1d8a6074e8
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Date:   Tue Jul 14 15:07:35 2015 +0100

    gdb: get_frame_language now takes a frame parameter.
    
    As part of a drive to remove deprecated_safe_get_selected_frame, make
    the get_frame_language function take a frame parameter.  Given the name
    of the function this actually seems to make a lot of sense.
    
    The task of fetching a suitable frame is then passed to the calling
    functions.  For get_frame_language there are not many callers, these are
    updated to get the selected frame in a suitable way.
    
    gdb/ChangeLog:
    
    	* language.c (show_language_command): Find selected frame before
    	asking for the language of that frame.
    	(set_language_command): Likewise.
    	* language.h (get_frame_language): Add frame parameter.
    	* stack.c (get_frame_language): Add frame parameter, assert
    	parameter is not NULL, update comment and reindent.
    	* top.c (check_frame_language_change): Pass the selected frame
    	into get_frame_language.

commit 0b45135ec1364f9d0c850a52ce05cf4ffb038021
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Date:   Fri Jul 31 13:48:22 2015 +0100

    objcopy: Improve wildcard matching for symbols with '!' prefix.
    
    When using options such as --localize-symbol, --globalize-symbol, etc,
    along with the --wildcard option, prefixing a symbol name with '!'
    should provide non-matching behaviour, as example the following example
    is given in the manual:
    
        --wildcard --weaken-symbol !foo --weaken-symbol fo*
    
    which should weaken all symbols matching the pattern 'fo*', but not the
    symbol 'foo'.
    
    However, this currently does not work, the current logic will waken all
    symbols matching the pattern 'fo*' AND all symbols that are not 'foo'.
    The symbol 'foo' is covered by the first condition, and so is weakened,
    while, other symbols, for example 'bar' will match the second condition,
    and so be weakened.
    
    This patch adjusts the logic so that a pattern prefixed with '!'
    specifically DOES NOT apply the relevant change to any matching symbols,
    instead of applying the change to all non-matching symbols.  So this:
    
        --weaken-symbol !foo
    
    will ensure that the symbol 'foo' is not weakened, but says nothing
    about symbols that are not 'foo'.  As a result, a pattern prefixed with
    '!' now only makes sense when used alongside a more wide ranging
    wildcard pattern.
    
    This change should make the wildcard matching feature more useful, with
    no overall loss of functionality.  The example given in the manual,
    weaken all symbols matching 'fo*' except 'foo' can now be achieved, but
    so too can more complex examples, such as weaken all symbols matching
    'fo*' except 'foo', 'foa', and 'fob', like this:
    
        --wildcard --weaken-symbol !foo \
                   --weaken-symbol !foa \
                   --weaken-symbol !fob \
                   --weaken-symbol fo*
    
    Under the previous scheme, something as symbols as, weaken all symbols
    except 'foo' could have been achieved with this:
    
        --weaken-symbol !foo
    
    however, this will no longer work.  To achieve the same result under the
    new scheme this is now required:
    
        --weaken-symbol !foo --weaken-symbol *
    
    binutils/ChangeLog:
    
    	* objcopy.c (is_specified_symbol_predicate): Don't stop at first
    	match.  Non-match rules set found to FALSE.
    
    binutils/testsuite/ChangeLog:
    
    	* binutils-all/objcopy.exp: Run new symbol tests.
    	(objcopy_test_symbol_manipulation): New function.
    	* binutils-all/symbols-1.d: New file.
    	* binutils-all/symbols-2.d: New file.
    	* binutils-all/symbols-3.d: New file.
    	* binutils-all/symbols-4.d: New file.
    	* binutils-all/symbols.s: New file.

commit da8c46d2967b6325dcd2cc72eca26d807964c93c
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Wed Mar 19 13:49:58 2014 +0100

    btrace: indicate speculative execution
    
    Indicate speculatively executed instructions with a leading '?'.  We use the
    space that is normally used for the PC prefix.  In the case where the
    instruction at the current PC had been executed speculatively before, the PC
    prefix will be partially overwritten resulting in "?> ".
    
    As a side-effect, the /p modifier to omit the PC prefix in the "record
    instruction-history" command now uses a 3-space PC prefix "   " in order to
    have enough space for the speculative execution indication.
    
    gdb/
    	* btrace.c (btrace_compute_ftrace_bts): Clear insn flags.
    	(pt_btrace_insn_flags): New.
    	(ftrace_add_pt): Call pt_btrace_insn_flags.
    	* btrace.h (btrace_insn_flag): New.
    	(btrace_insn) <flags>: New.
    	* record-btrace.c (btrace_insn_history): Print insn prefix.
    	* NEWS: Announce it.
    
    doc/
    	* gdb.texinfo (Process Record and Replay): Document prefixing of
    	speculatively executed instructions in the "record instruction-history"
    	command.
    
    testsuite/
    	* gdb.btrace/instruction_history.exp: Update.
    	* gdb.btrace/tsx.exp: New.
    	* gdb.btrace/tsx.c: New.
    	* lib/gdb.exp (skip_tsx_tests, skip_btrace_pt_tests): New.

commit 5599c404621b2d8ac021c1427aee6e8974572042
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Tue Jul 28 15:47:40 2015 +0200

    configure: check for perf_event.h version
    
    Intel(R) Processor Trace support requires a recent linux/perf_event.h header.
    
    When GDB is built on an older system, Intel(R) Processor Trace will not be
    available and there is no indication in the configure and build log as to
    what went wrong.
    
    Check for a compatible linux/perf_event.h at configure-time.
    
    gdb/
    	* configure.ac: Check for PERF_ATTR_SIZE_VER5 in linux/perf_event.h
    	* configure: Regenerate.

commit 016a3251631341bf4d8fe50966d2b70f8ea69e96
Author: DJ Delorie <dj@redhat.com>
Date:   Thu Aug 6 18:35:26 2015 -0400

    Yaakov Selkowitz: fixes for in-tree libiconv
    
            * Makefile.def (libiconv): Define bootstrap=true.
            Mark pdf/html/info as missing.
            (configure-gcc): Depend on all-libiconv.
            (all-gcc): Ditto.
            (configure-libcpp): Ditto.
            (all-libcpp): Ditto.
            (configure-intl): Ditto.
            (all-intl): Ditto.
            * Makefile.in: Regenerate.
    
    binutils/
            * configure: Regenerate.
    
    gdb/
            * Makefile.in (LIBICONV): Define.
            (CLIBS): Add LIBICONV.
            * acinclude.m4: Use config/iconv.m4 instead of custom AM_ICONV.
            * configure: Regenerate.

commit 308d9764e1ce02c31882e6d99bbaebe63c7fe830
Author: GDB Administrator <gdbadmin@sourceware.org>
Date:   Fri Aug 7 00:00:07 2015 +0000

    Automatic date update in version.in

commit de1c2c52237dd3e8d94df7b4a304ac9df75c8cf3
Author: Pedro Alves <palves@redhat.com>
Date:   Fri Aug 7 00:04:48 2015 +0100

    Bump timeouts for a couple gdb.reverse/*-precsave.exp tests
    
    The buildbot shows that PPC64 and x86_64 builders, both native and
    extended-remote gdbserver frequently timeout these tests.
    until-precsave.exp times out on my x86_64 occasionally as well.
    Inspecting the logs, we see that if we waited some more, the tests
    would pass.
    
    Simply bump until-precsave.exp timeouts further, and apply the same
    treatment to step-precsave.exp.
    
    gdb/testsuite/ChangeLog:
    2015-08-06  Pedro Alves <palves@redhat.com>
    
    	* gdb.reverse/step-precsave.exp: Use with_timeout_factor to
    	increase timeout.
    	* gdb.reverse/until-precsave.exp: Bump timeouts.

commit 782e0bf46a84f57139f25c31c2ffc93508f07ef5
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Aug 6 23:38:51 2015 +0100

    Fix gdb.base/valgrind-infcall.exp with the native-extended-gdbserver board
    
    This test fails with --target_board=native-extended-gdbserver because
    it misses the usual "disconnect":
    
     (gdb)  target remote | /usr/lib64/valgrind/../../bin/vgdb --pid=30454
     Already connected to a remote target.  Disconnect? (y or n) n
     Still connected.
     (gdb) FAIL: gdb.base/valgrind-infcall.exp: target remote for vgdb (got interactive prompt)
    
    gdb/testsuite/ChangeLog:
    2015-08-06  Pedro Alves  <palves@redhat.com>
    
    	* gdb.base/valgrind-infcall.exp: Issue a "disconnect".

commit aead7601eb0ddc3fa51d43747bdad0e02abda342
Author: Simon Marchi <simon.marchi@ericsson.com>
Date:   Thu Aug 6 17:21:41 2015 -0400

    Add casts for legitimate integer to enum conversions
    
    This patch is mostly extracted from Pedro's C++ branch.  It adds explicit
    casts from integer to enum types, where it is really the intention to do
    so.  This could be because we are ...
    
     * iterating on enum values (we need to iterate on an equivalent integer)
     * converting from a value read from bytes (dwarf attribute, agent
     expression opcode) to the equivalent enum
     * reading the equivalent integer value from another language (Python/Guile)
    
    An exception to that is the casts in regcache.c.  It seems to me like
    struct regcache's register_status field could be a pointer to an array of
    enum register_status.  Doing so would waste a bit of memory (4 bytes
    used by the enum vs 1 byte used by the current signed char, for each
    register).  If we switch to C++11 one day, we can define the underlying
    type of an enum type, so we could have the best of both worlds.
    
    gdb/ChangeLog:
    
    	* arm-tdep.c (set_fp_model_sfunc): Add cast from integer to enum.
    	(arm_set_abi): Likewise.
    	* ax-general.c (ax_print): Likewise.
    	* c-exp.y (exp : string_exp): Likewise.
    	* compile/compile-loc2c.c (compute_stack_depth_worker): Likewise.
    	(do_compile_dwarf_expr_to_c): Likewise.
    	* cp-name-parser.y (demangler_special : DEMANGLER_SPECIAL start):
    	Likewise.
    	* dwarf2expr.c (execute_stack_op): Likewise.
    	* dwarf2loc.c (dwarf2_compile_expr_to_ax): Likewise.
    	(disassemble_dwarf_expression): Likewise.
    	* dwarf2read.c (dwarf2_add_member_fn): Likewise.
    	(read_array_order): Likewise.
    	(abbrev_table_read_table): Likewise.
    	(read_attribute_value): Likewise.
    	(skip_unknown_opcode): Likewise.
    	(dwarf_decode_macro_bytes): Likewise.
    	(dwarf_decode_macros): Likewise.
    	* eval.c (value_f90_subarray): Likewise.
    	* guile/scm-param.c (gdbscm_make_parameter): Likewise.
    	* i386-linux-tdep.c (i386_canonicalize_syscall): Likewise.
    	* infrun.c (handle_command): Likewise.
    	* memory-map.c (memory_map_start_memory): Likewise.
    	* osabi.c (set_osabi): Likewise.
    	* parse.c (operator_length_standard): Likewise.
    	* ppc-linux-tdep.c (ppc_canonicalize_syscall): Likewise, and use
    	single return point.
    	* python/py-frame.c (gdbpy_frame_stop_reason_string): Likewise.
    	* python/py-symbol.c (gdbpy_lookup_symbol): Likewise.
    	(gdbpy_lookup_global_symbol): Likewise.
    	* record-full.c (record_full_restore): Likewise.
    	* regcache.c (regcache_register_status): Likewise.
    	(regcache_raw_read): Likewise.
    	(regcache_cooked_read): Likewise.
    	* rs6000-tdep.c (powerpc_set_vector_abi): Likewise.
    	* symtab.c (initialize_ordinary_address_classes): Likewise.
    	* target-debug.h (target_debug_print_signals): Likewise.
    	* utils.c (do_restore_current_language): Likewise.

commit 84da3f0cf938f8f74d9fa89f89f228bc950282c6
Author: Simon Marchi <simon.marchi@ericsson.com>
Date:   Thu Aug 6 15:36:31 2015 -0400

    Add missing ChangeLog entry header

commit 9d996aba1a365564c18dd939772d379c97c94213
Author: Simon Marchi <simon.marchi@ericsson.com>
Date:   Thu Aug 6 14:28:00 2015 -0400

    Fix ChangeLog formatting
    
    Spaces -> Tab.

commit 33ebda9d6841e18d9ef18b94c3dcad7d0498ab3d
Author: Pedro Alves <palves@redhat.com>
Date:   Mon Mar 9 11:58:10 2015 +0000

    gdbserver/tracepoint.c: make exported IPA global int instead of enum
    
    Fixes another C++ -fpermissive error:
    
      src/gdb/gdbserver/tracepoint.c:4535:21: error: invalid conversion from ‘int’ to ‘eval_result_type’ [-fpermissive]
        expr_eval_result = ipa_expr_eval_result;
    
    gdb/gdbserver/ChangeLog:
    2015-08-06  Pedro Alves  <palves@redhat.com>
    
    	* tracepoint.c (expr_eval_result): Now an int.

commit a44892be35506471a53e5bc8c2def4ffccf451f9
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Aug 6 17:29:01 2015 +0100

    gdbserver: no point in hiding the regcache type nowadays
    
    The regcache used to be hidden inside inferiors.c, but since the
    tracepoints support that it's a first class object.  This also fixes a
    few implicit pointer conversion errors in C++ mode, caused by a few
    places missing the explicit cast.
    
    gdb/gdbserver/ChangeLog:
    2015-08-06  Pedro Alves  <palves@redhat.com>
    
    	* gdbthread.h (struct regcache): Forward declare.
    	(struct thread_info) <regcache_data>: Now a struct regcache
    	pointer.
    	* inferiors.c (inferior_regcache_data)
    	(set_inferior_regcache_data): Now work with struct regcache
    	pointers.
    	* inferiors.h (struct regcache): Forward declare.
    	(inferior_regcache_data, set_inferior_regcache_data): Now work
    	with struct regcache pointers.
    	* regcache.c (get_thread_regcache, regcache_invalidate_thread)
    	(free_register_cache_thread): Remove struct regcache pointer
    	casts.

commit ca0a5f0bd33d0aa17a5cf518e41e47ddfde486ad
Author: Clem Dickey <clemd@acm.org>
Date:   Thu Aug 6 09:24:58 2015 -0700

    PR python/17136
    
    gdb/ChangeLog:
    
    	* python/lib/gdb/command/type_printers.py (InfoTypePrinter): Fix typo.

commit 608a1e46394e9df951968c9112fbec3065da5fba
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Aug 6 17:10:09 2015 +0100

    gdbserver: fix silent error exit
    
    Running gdb.threads/process-dies-while-handling-bp.exp against
    gdbserver sometimes FAILs because GDBserver drops the connection, but
    the logs leave no clue on what the reason could be.  Running manually
    a few times, I saw the same:
    
     $  ./gdbserver/gdbserver --multi :9999 testsuite/gdb.threads/process-dies-while-handling-bp
     Process testsuite/gdb.threads/process-dies-while-handling-bp created; pid = 12766
     Listening on port 9999
     Remote debugging from host 127.0.0.1
     Listening on port 9999
    
     Child exited with status 0
    
     Child exited with status 0
    
    What happened is that an exception escaped and gdbserver reopened the
    connection, which led to that second "Listening on port 9999" output.
    
    The error was a failure to access registers from a now-dead thread.
    The exception probably shouldn't have escaped here, but meanwhile,
    this at least makes the issue less mysterious.
    
    Tested on x86_64 Fedora 20.
    
    gdb/gdbserver/ChangeLog:
    2015-08-06  Pedro Alves  <palves@redhat.com>
    
    	* server.c (captured_main): On error, print the exception message
    	to stderr, and if run_once is set, throw a quit.

commit 05d999b0896ab6ccd4ce23a715765484c60a967d
Author: Simon Marchi <simon.marchi@ericsson.com>
Date:   Thu Aug 6 12:01:05 2015 -0400

    Change type of struct complaints::series
    
    Found while processing the C++ enum changes.  It seems like series
    should be of type enum complaint_series, instead of adding a cast.
    
    Redundant and out of date comments are also removed.
    
    gdb/ChangeLog:
    
    	* complaints.c (enum complaint_series): Add newlines and remove
    	out of date comment.
    	(struct complaints) <series>: Change type to enum
    	complaint_series and remove out of date comment.
    	(symfile_complaint_hook): Use equivalent enum value
    	ISOLATED_MESSAGE instead of 0.

commit f0ce0d3a331129309a46a6a9ac85fce35acae72b
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Jul 23 16:01:01 2015 +0100

    gdbserver: move_out_of_jump_pad_callback misses switching current thread
    
    While hacking on the fix for PR threads/18600 (Threads left stopped
    after fork+thread spawn), I once saw its test (fork-plus-threads.exp)
    FAIL against gdbserver because move_out_of_jump_pad_callback has a
    gdb_breakpoint_here call, and the caller isn't making sure the current
    thread points to the right thread.  In the case I saw, the current
    thread pointed to the wrong process, so gdb_breakpoint_here returned
    the wrong answer.  Unfortunately I didn't save logs.  Still, seems
    obvious enough and it should fix a potential occasional racy FAIL.
    
    Tested on x86_64 Fedora 20.
    
    gdb/gdbserver/ChangeLog:
    2015-08-06  Pedro Alves  <palves@redhat.com>
    
    	* linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
    	the current thread.

commit bf47e2482d3e88580ba5a22db48bc773fa8ced3f
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Jul 30 16:15:24 2015 +0100

    Fix gdbserver --debug issues caught by Valgrind
    
    Running gdbserver --debug under Valgrind shows:
    
     ==4803== Invalid read of size 4
     ==4803==    at 0x432B62: linux_write_memory (linux-low.c:5320)
     ==4803==    by 0x4143F7: write_inferior_memory (target.c:83)
     ==4803==    by 0x415895: remove_memory_breakpoint (mem-break.c:362)
     ==4803==    by 0x432EF5: linux_remove_point (linux-low.c:5460)
     ==4803==    by 0x416319: delete_raw_breakpoint (mem-break.c:802)
     ==4803==    by 0x4163F3: release_breakpoint (mem-break.c:842)
     ==4803==    by 0x416477: delete_breakpoint_1 (mem-break.c:869)
     ==4803==    by 0x4164EF: delete_breakpoint (mem-break.c:891)
     ==4803==    by 0x416843: delete_gdb_breakpoint_1 (mem-break.c:1069)
     ==4803==    by 0x4168D8: delete_gdb_breakpoint (mem-break.c:1098)
     ==4803==    by 0x4134E3: process_serial_event (server.c:4051)
     ==4803==    by 0x4138E4: handle_serial_event (server.c:4196)
     ==4803==  Address 0x4c6b930 is 0 bytes inside a block of size 1 alloc'd
     ==4803==    at 0x4A0645D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
     ==4803==    by 0x4240C6: xmalloc (common-utils.c:43)
     ==4803==    by 0x41439C: write_inferior_memory (target.c:80)
     ==4803==    by 0x415895: remove_memory_breakpoint (mem-break.c:362)
     ==4803==    by 0x432EF5: linux_remove_point (linux-low.c:5460)
     ==4803==    by 0x416319: delete_raw_breakpoint (mem-break.c:802)
     ==4803==    by 0x4163F3: release_breakpoint (mem-break.c:842)
     ==4803==    by 0x416477: delete_breakpoint_1 (mem-break.c:869)
     ==4803==    by 0x4164EF: delete_breakpoint (mem-break.c:891)
     ==4803==    by 0x416843: delete_gdb_breakpoint_1 (mem-break.c:1069)
     ==4803==    by 0x4168D8: delete_gdb_breakpoint (mem-break.c:1098)
     ==4803==    by 0x4134E3: process_serial_event (server.c:4051)
     ==4803==
    
    And:
    
     ==7272== Conditional jump or move depends on uninitialised value(s)
     ==7272==    at 0x3615E48361: vfprintf (vfprintf.c:1634)
     ==7272==    by 0x414E89: debug_vprintf (debug.c:60)
     ==7272==    by 0x42800A: debug_printf (common-debug.c:35)
     ==7272==    by 0x43937B: my_waitpid (linux-waitpid.c:149)
     ==7272==    by 0x42D740: linux_wait_for_event_filtered (linux-low.c:2441)
     ==7272==    by 0x42DADA: linux_wait_for_event (linux-low.c:2552)
     ==7272==    by 0x42E165: linux_wait_1 (linux-low.c:2860)
     ==7272==    by 0x42F5D8: linux_wait (linux-low.c:3453)
     ==7272==    by 0x4144A4: mywait (target.c:107)
     ==7272==    by 0x413969: handle_target_event (server.c:4214)
     ==7272==    by 0x41A1A6: handle_file_event (event-loop.c:429)
     ==7272==    by 0x41996D: process_event (event-loop.c:184)
    
    gdb/ChangeLog:
    2015-08-06  Pedro Alves  <palves@redhat.com>
    
    	* nat/linux-waitpid.c (my_waitpid): Only print *status if waitpid
    	returned > 0.
    
    gdb/gdbserver/ChangeLog:
    2015-08-06  Pedro Alves  <palves@redhat.com>
    
    	* linux-low.c (linux_write_memory): Rewrite debug output to avoid
    	reading beyond the passed in buffer length.

commit f6a9d9c7db9b6b58e6915869c1bd7c83d96d31ee
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Aug 6 12:45:45 2015 +0100

    Revert "test slowdown"
    
    That was pushed by mistake.

commit 83e97ed023e828a7d924b765661374272c7f7eb4
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Aug 6 12:33:20 2015 +0100

    Test for PR18749: problems if whole process dies while (ptrace-) stopped
    
    This adds a kfailed test that has the whole process exit just while
    several threads continuously step over a breakpoint.  Usually, the
    process exits just while GDB or GDBserver is handling the breakpoint
    hit.  In other words, the process disappears while the event thread is
    (ptrace-) stopped.  This exposes several issues in GDB and GDBserver.
    Errors, crashes, etc.
    
    I fixed some of these issues recently, but there's a lot more to do.
    It's a bit like playing whack-a-mole at the moment.  You fix an issue,
    which then exposes several others.
    
    E.g., with the native target, you get (among other errors):
    
      (...)
      [New Thread 0x7ffff47b9700 (LWP 18077)]
      [New Thread 0x7ffff3fb8700 (LWP 18078)]
      [New Thread 0x7ffff37b7700 (LWP 18079)]
      Cannot find user-level thread for LWP 18076: generic error
      (gdb) KFAIL: gdb.threads/process-dies-while-handling-bp.exp: non_stop=on: cond_bp_target=1: inferior 1 exited (prompt) (PRMS: gdb/18749)
    
    gdb/testsuite/ChangeLog:
    2015-08-06  Pedro Alves  <palves@redhat.com>
    
    	PR gdb/18749
    	* gdb.threads/process-dies-while-handling-bp.c: New file.
    	* gdb.threads/process-dies-while-handling-bp.exp: New file.

commit 4807d3f32937bc4d932638fd8f8b3084be82b74a
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Aug 6 12:33:19 2015 +0100

    test slowdown

commit b6b9ffccac04b8729d5206b5a9fefa09ea2510f3
Author: Pierre Langlois <pierre.langlois@arm.com>
Date:   Thu Aug 6 12:27:32 2015 +0100

    Remove required field in agent's symbols
    
    This field was never set nor used.  This patch removes it.
    
    gdb/ChangeLog:
    
    	* common/agent.c (symbol_list) <required>: Remove.
    
    gdb/gdbserver/ChangeLog:
    
    	* tracepoint.c (symbol_list) <required>: Remove.

commit 863d01bde2725d009c45ab7e9ba1dbf3f5b923f8
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Aug 6 10:30:18 2015 +0100

    gdbserver: Fix non-stop / fork / step-over issues
    
    Ref: https://sourceware.org/ml/gdb-patches/2015-07/msg00868.html
    
    This adds a test that has a multithreaded program have several threads
    continuously fork, while another thread continuously steps over a
    breakpoint.
    
    This exposes several intertwined issues, which this patch addresses:
    
     - When we're stopping and suspending threads, some thread may fork,
       and we missed setting its suspend count to 1, like we do when a new
       clone/thread is detected.  When we next unsuspend threads, the fork
       child's suspend count goes below 0, which is bogus and fails an
       assertion.
    
     - If a step-over is cancelled because a signal arrives, but then gdb
       is not interested in the signal, we pass the signal straight back
       to the inferior.  However, we miss that we need to re-increment the
       suspend counts of all other threads that had been paused for the
       step-over.  As a result, other threads indefinitely end up stuck
       stopped.
    
     - If a detach request comes in just while gdbserver is handling a
       step-over (in the test at hand, this is GDB detaching the fork
       child), gdbserver internal errors in stabilize_thread's helpers,
       which assert that all thread's suspend counts are 0 (otherwise we
       wouldn't be able to move threads out of the jump pads).  The
       suspend counts aren't 0 while a step-over is in progress, because
       all threads but the one stepping past the breakpoint must remain
       paused until the step-over finishes and the breakpoint can be
       reinserted.
    
     - Occasionally, we see "BAD - reinserting but not stepping." being
       output (from within linux_resume_one_lwp_throw).  That was because
       GDB pokes memory while gdbserver is busy with a step-over, and that
       suspends threads, and then re-resumes them with proceed_one_lwp,
       which missed another reason to tell linux_resume_one_lwp that the
       thread should be set back to stepping.
    
     - In a couple places, we were resuming threads that are meant to be
       suspended.  E.g., when a vCont;c/s request for thread B comes in
       just while gdbserver is stepping thread A past a breakpoint.  The
       resume for thread B must be deferred until the step-over finishes.
    
     - The test runs with both "set detach-on-fork" on and off.  When off,
       it exercises the case of GDB detaching the fork child explicitly.
       When on, it exercises the case of gdb resuming the child
       explicitly.  In the "off" case, gdb seems to exponentially become
       slower as new inferiors are created.  This is _very_ noticeable as
       with only 100 inferiors gdb is crawling already, which makes the
       test take quite a bit to run.  For that reason, I've disabled the
       "off" variant for now.
    
    gdb/ChangeLog:
    2015-08-06  Pedro Alves  <palves@redhat.com>
    
    	* target/waitstatus.h (enum target_stop_reason)
    	<TARGET_STOPPED_BY_SINGLE_STEP>: New value.
    
    gdb/gdbserver/ChangeLog:
    2015-08-06  Pedro Alves  <palves@redhat.com>
    
    	* linux-low.c (handle_extended_wait): Set the fork child's suspend
    	count if stopping and suspending threads.
    	(check_stopped_by_breakpoint): If stopped by trace, set the LWP's
    	stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
    	(linux_detach): Complete an ongoing step-over.
    	(lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
    	throughout.
    	(resume_stopped_resumed_lwps): Don't resume a suspended thread.
    	(linux_wait_1): If passing a signal to the inferior after
    	finishing a step-over, unsuspend and re-resume all lwps.  If we
    	see a single-step event but the thread should be continuing, don't
    	pass the trap to gdb.
    	(stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
    	internal_error instead of gdb_assert.
    	(enqueue_pending_signal): New function.
    	(check_ptrace_stopped_lwp_gone): Add debug output.
    	(start_step_over): Use internal_error instead of gdb_assert.
    	(complete_ongoing_step_over): New function.
    	(linux_resume_one_thread): Don't resume a suspended thread.
    	(proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
    	it stepping.
    
    gdb/testsuite/ChangeLog:
    2015-08-06  Pedro Alves  <palves@redhat.com>
    
    	* gdb.threads/forking-threads-plus-breakpoint.exp: New file.
    	* gdb.threads/forking-threads-plus-breakpoint.c: New file.

commit 00db26facc14ac830adef704bba9b24d0d366ddf
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Aug 6 10:30:17 2015 +0100

    Linux gdbserver confused when event randomization picks process exit event
    
    The tail end of linux_wait_1 isn't expecting that the select_event_lwp
    machinery can pick a whole-process exit event to report to GDB.  When
    that happens, both gdb and gdbserver end up quite confused:
    
     ...
     (gdb)
     [Thread 24971.24971] #1 stopped.
     0x0000003615a011f0 in ?? ()
     c&
     Continuing.
     (gdb) [New Thread 24971.24981]
     [New Thread 24983.24983]
     [New Thread 24971.24982]
    
     [Thread 24983.24983] #3 stopped.
     0x0000003615ebc7cc in __libc_fork () at ../nptl/sysdeps/unix/sysv/linux/fork.c:130
     130       pid = ARCH_FORK ();
     [New Thread 24984.24984]
     Error in re-setting breakpoint -16: PC register is not available
     Error in re-setting breakpoint -17: PC register is not available
     Error in re-setting breakpoint -18: PC register is not available
     Error in re-setting breakpoint -19: PC register is not available
     Error in re-setting breakpoint -24: PC register is not available
     Error in re-setting breakpoint -25: PC register is not available
     Error in re-setting breakpoint -26: PC register is not available
     Error in re-setting breakpoint -27: PC register is not available
     Error in re-setting breakpoint -28: PC register is not available
     Error in re-setting breakpoint -29: PC register is not available
     Error in re-setting breakpoint -30: PC register is not available
     PC register is not available
     (gdb)
    
    gdb/gdbserver/ChangeLog:
    2015-08-06  Pedro Alves  <palves@redhat.com>
    
    	* linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
    	(linux_thread_alive): Use lwp_is_marked_dead.
    	(extended_event_reported): Delete.
    	(linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
    	instead of extended_event_reported.
    	(mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
    	as well.
    	(lwp_is_marked_dead): New function.
    	(lwp_running): Use lwp_is_marked_dead.
    	* linux-low.h: Delete 'dead' field, and update 'waitstatus's
    	comment.

commit ad071a3055b9b47dad340c1a1cb3a9b39529cef0
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Aug 6 10:30:16 2015 +0100

    Linux gdbserver fork event debug output
    
    The "extended event with waitstatus" debug output is unreachable, as
    it is guarded by "if (!report_to_gdb)".  If extended_event_reported is
    true, then so is report_to_gdb.  Move it to where we print why we're
    reporting an event to GDB.
    
    Also, the debug output currently tries to print the wrong struct
    target_waitstatus.
    
    gdb/gdbserver/ChangeLog:
    2015-08-06  Pedro Alves  <palves@redhat.com>
    
    	* linux-low.c (linux_wait_1): Move fork event output out of the
    	!report_to_gdb check.  Pass event_child->waitstatus to
    	target_waitstatus_to_string instead of ourstatus.

commit e0a3af227ee0602ae69320fd6f931c363f14975b
Author: Alan Modra <amodra@gmail.com>
Date:   Thu Aug 6 15:56:34 2015 +0930

    Revert ALIGN changes
    
    Reverts a2c59f28 and e474ab13.  Since the unary form of ALIGN only
    references "dot" implicitly, there isn't really a strong argument for
    making ALIGN use a relative value when inside an output section.
    
    	* ldexp.c (align_dot_val): Delete.
    	(fold_unary <ALIGN_K, NEXT>): Revert 2015-07-10 change.
    	(is_align_conditional): Revert 2015-07-20 change.
    	(exp_fold_tree_1): Likewise, but keep expanded comment.
    	* scripttempl/elf.sc (.ldata, .bss): Revert 2015-07-20 change.
    	* ld.texinfo (<ALIGN>): Correct description.

commit 0cf003f49ee8bbd5dc5f1ce45193c7ae056c69b8
Author: GDB Administrator <gdbadmin@sourceware.org>
Date:   Thu Aug 6 00:00:10 2015 +0000

    Automatic date update in version.in

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                          |   19 +
 Makefile.def                                       |   11 +-
 Makefile.in                                        |  647 +++++-
 bfd/ChangeLog                                      |  137 ++
 bfd/bfd-in2.h                                      |   12 +
 bfd/coff-sh.c                                      |    2 +-
 bfd/elf-bfd.h                                      |   13 +-
 bfd/elf.c                                          |   26 +-
 bfd/elf32-i386.c                                   |   12 +-
 bfd/elf32-or1k.c                                   |    6 +-
 bfd/elf64-x86-64.c                                 |   12 +-
 bfd/elflink.c                                      |  215 ++-
 bfd/elfnn-aarch64.c                                |   74 +-
 bfd/elfxx-aarch64.c                                |    5 +
 bfd/libbfd.h                                       |    3 +
 bfd/peicode.h                                      |   32 +
 bfd/reloc.c                                        |   15 +
 bfd/version.h                                      |    2 +-
 binutils/ChangeLog                                 |    9 +
 binutils/configure                                 |   93 +-
 binutils/objcopy.c                                 |    8 +-
 binutils/testsuite/ChangeLog                       |   31 +
 binutils/testsuite/binutils-all/objcopy.exp        |   14 +
 binutils/testsuite/binutils-all/strip-12.d         |    7 +
 binutils/testsuite/binutils-all/strip-12.s         |    7 +
 binutils/testsuite/binutils-all/symbols-1.d        |   15 +
 binutils/testsuite/binutils-all/symbols-2.d        |   15 +
 binutils/testsuite/binutils-all/symbols-3.d        |   15 +
 binutils/testsuite/binutils-all/symbols-4.d        |   15 +
 binutils/testsuite/binutils-all/symbols.s          |   14 +
 config.guess                                       |    6 +-
 config.sub                                         |    7 +-
 gas/ChangeLog                                      |   49 +
 gas/config/tc-aarch64.c                            |   24 +
 gas/config/tc-arm.c                                |   14 +-
 gas/config/tc-mmix.c                               |    4 +-
 gas/config/tc-msp430.c                             |   20 +-
 gas/config/tc-tic4x.c                              |    2 +-
 gas/config/xtensa-relax.c                          |    2 +-
 gas/testsuite/ChangeLog                            |   28 +
 gas/testsuite/gas/aarch64/reloc-dtprel_lo12-1.d    |    9 +
 gas/testsuite/gas/aarch64/reloc-dtprel_lo12-1.s    |    5 +
 .../gas/aarch64/reloc-dtprel_lo12-ilp32-1.d        |   10 +
 .../gas/aarch64/reloc-dtprel_lo12-ilp32-1.s        |    5 +
 gas/testsuite/gas/aarch64/reloc-tlsldm-page-1.d    |   10 +
 gas/testsuite/gas/aarch64/reloc-tlsldm-page-1.s    |    6 +
 .../gas/aarch64/reloc-tlsldm-page-ilp32-1.d        |   12 +
 .../gas/aarch64/reloc-tlsldm-page-ilp32-1.s        |    6 +
 gas/testsuite/gas/aarch64/reloc-tlsldm_lo12_nc-1.d |   10 +
 gas/testsuite/gas/aarch64/reloc-tlsldm_lo12_nc-1.s |    5 +
 .../gas/aarch64/reloc-tlsldm_lo12_nc-ilp32-1.d     |   11 +
 .../gas/aarch64/reloc-tlsldm_lo12_nc-ilp32-1.s     |    5 +
 gas/testsuite/gas/mips/r6-n32.d                    |    2 +
 gas/testsuite/gas/mips/r6-n64.d                    |    2 +
 gas/testsuite/gas/mips/r6.d                        |    2 +
 gas/testsuite/gas/mips/r6.s                        |    3 +
 gdb/ChangeLog                                      |  457 ++++-
 gdb/Makefile.in                                    |    5 +-
 gdb/NEWS                                           |   17 +
 gdb/acinclude.m4                                   |  127 +--
 gdb/arm-tdep.c                                     |    4 +-
 gdb/ax-general.c                                   |    2 +-
 gdb/breakpoint.c                                   |   11 +-
 gdb/btrace.c                                       |   15 +
 gdb/btrace.h                                       |   10 +
 gdb/c-exp.y                                        |    2 +-
 gdb/common/agent.c                                 |    1 -
 gdb/compile/compile-loc2c.c                        |    4 +-
 gdb/complaints.c                                   |   17 +-
 gdb/configure                                      |  856 ++++++--
 gdb/configure.ac                                   |   14 +
 gdb/cp-name-parser.y                               |    2 +-
 gdb/darwin-nat.c                                   |    6 +-
 gdb/doc/ChangeLog                                  |   11 +
 gdb/doc/gdb.texinfo                                |   33 +-
 gdb/dtrace-probe.c                                 |    8 +
 gdb/dwarf2expr.c                                   |    2 +-
 gdb/dwarf2loc.c                                    |    4 +-
 gdb/dwarf2read.c                                   |   27 +-
 gdb/eval.c                                         |    3 +-
 gdb/frame.c                                        |   42 +
 gdb/frame.h                                        |    7 +
 gdb/gdbarch.h                                      |    6 +-
 gdb/gdbarch.sh                                     |    4 +
 gdb/gdbserver/ChangeLog                            |   82 +
 gdb/gdbserver/gdbthread.h                          |    3 +-
 gdb/gdbserver/inferiors.c                          |    4 +-
 gdb/gdbserver/inferiors.h                          |    5 +-
 gdb/gdbserver/linux-low.c                          |  328 +++-
 gdb/gdbserver/linux-low.h                          |   11 +-
 gdb/gdbserver/regcache.c                           |    7 +-
 gdb/gdbserver/server.c                             |    6 +
 gdb/gdbserver/tracepoint.c                         |    6 +-
 gdb/gdbthread.h                                    |   61 +-
 gdb/guile/scm-param.c                              |    2 +-
 gdb/i386-linux-tdep.c                              |    2 +-
 gdb/inf-ptrace.c                                   |    6 +-
 gdb/infcmd.c                                       |    6 +-
 gdb/infrun.c                                       | 2234 +++++++++++++++-----
 gdb/infrun.h                                       |    7 +
 gdb/language.c                                     |   35 +-
 gdb/language.h                                     |    2 -
 gdb/linux-nat.c                                    |   33 +-
 gdb/memory-map.c                                   |    2 +-
 gdb/nat/linux-waitpid.c                            |    2 +-
 gdb/nto-procfs.c                                   |   16 +-
 gdb/osabi.c                                        |   16 +-
 gdb/parse.c                                        |    3 +-
 gdb/ppc-linux-tdep.c                               |   31 +-
 gdb/procfs.c                                       |    6 +-
 gdb/python/lib/gdb/command/type_printers.py        |    2 +-
 gdb/python/py-frame.c                              |    2 +-
 gdb/python/py-symbol.c                             |    5 +-
 gdb/record-btrace.c                                |   25 +-
 gdb/record-full.c                                  |    2 +-
 gdb/regcache.c                                     |    6 +-
 gdb/remote-m32r-sdi.c                              |    6 +-
 gdb/remote-sim.c                                   |   20 +-
 gdb/remote.c                                       |   57 +-
 gdb/rs6000-tdep.c                                  |   70 +-
 gdb/s390-linux-tdep.c                              |  115 +-
 gdb/source.c                                       |    5 +-
 gdb/stack.c                                        |   45 -
 gdb/symtab.c                                       |   40 +-
 gdb/symtab.h                                       |    2 +
 gdb/target-debug.h                                 |    5 +-
 gdb/target-delegates.c                             |   59 +
 gdb/target.c                                       |   92 +
 gdb/target.h                                       |   28 +-
 gdb/target/waitstatus.h                            |    5 +-
 gdb/testsuite/ChangeLog                            |   66 +
 gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp       |   50 +-
 gdb/testsuite/gdb.base/checkpoint-ns.exp           |   26 +
 gdb/testsuite/gdb.base/checkpoint.exp              |    6 +-
 gdb/testsuite/gdb.base/completion.exp              |   82 +
 gdb/testsuite/gdb.base/valgrind-disp-step.c        |   32 +
 ...valgrind-infcall.exp => valgrind-disp-step.exp} |   81 +-
 gdb/testsuite/gdb.base/valgrind-infcall.exp        |    5 +
 gdb/testsuite/gdb.btrace/instruction_history.exp   |   20 +-
 gdb/testsuite/gdb.btrace/tsx.c                     |   26 +
 gdb/testsuite/gdb.btrace/tsx.exp                   |   41 +
 gdb/testsuite/gdb.btrace/x86-tsx.S                 |   29 +
 gdb/testsuite/gdb.reverse/step-precsave.exp        |   15 +-
 gdb/testsuite/gdb.reverse/until-precsave.exp       |    4 +-
 .../gdb.threads/forking-threads-plus-breakpoint.c  |  139 ++
 .../forking-threads-plus-breakpoint.exp            |  117 +
 .../gdb.threads/process-dies-while-handling-bp.c   |   73 +
 .../gdb.threads/process-dies-while-handling-bp.exp |  147 ++
 .../signal-while-stepping-over-bp-other-thread.exp |    2 +-
 .../gdb.threads/step-over-lands-on-breakpoint.c    |   17 +-
 .../gdb.threads/step-over-lands-on-breakpoint.exp  |    6 +-
 .../gdb.threads/step-over-trips-on-watchpoint.c    |   17 +-
 .../gdb.threads/step-over-trips-on-watchpoint.exp  |    9 +-
 gdb/testsuite/lib/gdb.exp                          |  124 ++
 gdb/thread.c                                       |  197 ++-
 gdb/top.c                                          |    6 +-
 gdb/utils.c                                        |    2 +-
 gdb/windows-nat.c                                  |    6 +-
 include/elf/ChangeLog                              |   12 +
 include/elf/aarch64.h                              |    3 +
 intl/ChangeLog                                     |    4 +
 intl/configure                                     |  824 +++-----
 ld/ChangeLog                                       |    9 +
 ld/ld.texinfo                                      |    2 +-
 ld/ldexp.c                                         |   80 +-
 ld/scripttempl/elf.sc                              |    4 +-
 ld/testsuite/ChangeLog                             |   39 +
 ld/testsuite/ld-aarch64/aarch64-elf.exp            |    5 +
 ld/testsuite/ld-aarch64/emit-relocs-529-overflow.d |    4 +
 ld/testsuite/ld-aarch64/emit-relocs-529-overflow.s |   11 +
 ld/testsuite/ld-aarch64/emit-relocs-529.d          |    7 +
 ld/testsuite/ld-aarch64/emit-relocs-529.s          |   10 +
 ld/testsuite/ld-aarch64/emit-relocs-86-overflow.d  |    5 +
 ld/testsuite/ld-aarch64/emit-relocs-86-overflow.s  |   11 +
 ld/testsuite/ld-aarch64/emit-relocs-86.d           |    8 +
 ld/testsuite/ld-aarch64/emit-relocs-86.s           |   10 +
 ld/testsuite/ld-aarch64/tls-small-ld.d             |    9 +
 ld/testsuite/ld-aarch64/tls-small-ld.s             |    8 +
 ld/testsuite/ld-elf/indirect.exp                   |   25 +-
 ld/testsuite/ld-elf/pr18720.out                    |    2 +
 ld/testsuite/ld-elf/pr18720a.c                     |   27 +
 ld/testsuite/ld-elf/pr18720b.c                     |   11 +
 ld/testsuite/ld-elf/pr18720c.c                     |   15 +
 ld/testsuite/ld-ifunc/ifunc.exp                    |   27 +
 ld/testsuite/ld-ifunc/pr18808.out                  |    1 +
 ld/testsuite/ld-ifunc/pr18808a.c                   |    9 +
 ld/testsuite/ld-ifunc/pr18808b.c                   |   24 +
 ld/testsuite/lib/ld-lib.exp                        |   45 +
 libiberty/ChangeLog                                |    7 +
 libiberty/d-demangle.c                             |   15 +-
 libiberty/testsuite/d-demangle-expected            |   22 +-
 opcodes/ChangeLog                                  |   15 +
 opcodes/aarch64-tbl.h                              |    2 +-
 opcodes/i386-gen.c                                 |    2 +-
 opcodes/i386-init.h                                |    2 +-
 opcodes/mips-opc.c                                 |    1 +
 196 files changed, 7467 insertions(+), 2144 deletions(-)
 create mode 100644 binutils/testsuite/binutils-all/strip-12.d
 create mode 100644 binutils/testsuite/binutils-all/strip-12.s
 create mode 100644 binutils/testsuite/binutils-all/symbols-1.d
 create mode 100644 binutils/testsuite/binutils-all/symbols-2.d
 create mode 100644 binutils/testsuite/binutils-all/symbols-3.d
 create mode 100644 binutils/testsuite/binutils-all/symbols-4.d
 create mode 100644 binutils/testsuite/binutils-all/symbols.s
 create mode 100644 gas/testsuite/gas/aarch64/reloc-dtprel_lo12-1.d
 create mode 100644 gas/testsuite/gas/aarch64/reloc-dtprel_lo12-1.s
 create mode 100644 gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ilp32-1.d
 create mode 100644 gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ilp32-1.s
 create mode 100644 gas/testsuite/gas/aarch64/reloc-tlsldm-page-1.d
 create mode 100644 gas/testsuite/gas/aarch64/reloc-tlsldm-page-1.s
 create mode 100644 gas/testsuite/gas/aarch64/reloc-tlsldm-page-ilp32-1.d
 create mode 100644 gas/testsuite/gas/aarch64/reloc-tlsldm-page-ilp32-1.s
 create mode 100644 gas/testsuite/gas/aarch64/reloc-tlsldm_lo12_nc-1.d
 create mode 100644 gas/testsuite/gas/aarch64/reloc-tlsldm_lo12_nc-1.s
 create mode 100644 gas/testsuite/gas/aarch64/reloc-tlsldm_lo12_nc-ilp32-1.d
 create mode 100644 gas/testsuite/gas/aarch64/reloc-tlsldm_lo12_nc-ilp32-1.s
 create mode 100644 gdb/testsuite/gdb.base/checkpoint-ns.exp
 create mode 100644 gdb/testsuite/gdb.base/valgrind-disp-step.c
 copy gdb/testsuite/gdb.base/{valgrind-infcall.exp => valgrind-disp-step.exp} (62%)
 create mode 100644 gdb/testsuite/gdb.btrace/tsx.c
 create mode 100644 gdb/testsuite/gdb.btrace/tsx.exp
 create mode 100644 gdb/testsuite/gdb.btrace/x86-tsx.S
 create mode 100644 gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.c
 create mode 100644 gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp
 create mode 100644 gdb/testsuite/gdb.threads/process-dies-while-handling-bp.c
 create mode 100644 gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp
 create mode 100644 ld/testsuite/ld-aarch64/emit-relocs-529-overflow.d
 create mode 100644 ld/testsuite/ld-aarch64/emit-relocs-529-overflow.s
 create mode 100644 ld/testsuite/ld-aarch64/emit-relocs-529.d
 create mode 100644 ld/testsuite/ld-aarch64/emit-relocs-529.s
 create mode 100644 ld/testsuite/ld-aarch64/emit-relocs-86-overflow.d
 create mode 100644 ld/testsuite/ld-aarch64/emit-relocs-86-overflow.s
 create mode 100644 ld/testsuite/ld-aarch64/emit-relocs-86.d
 create mode 100644 ld/testsuite/ld-aarch64/emit-relocs-86.s
 create mode 100644 ld/testsuite/ld-aarch64/tls-small-ld.d
 create mode 100644 ld/testsuite/ld-aarch64/tls-small-ld.s
 create mode 100644 ld/testsuite/ld-elf/pr18720.out
 create mode 100644 ld/testsuite/ld-elf/pr18720a.c
 create mode 100644 ld/testsuite/ld-elf/pr18720b.c
 create mode 100644 ld/testsuite/ld-elf/pr18720c.c
 create mode 100644 ld/testsuite/ld-ifunc/pr18808.out
 create mode 100644 ld/testsuite/ld-ifunc/pr18808a.c
 create mode 100644 ld/testsuite/ld-ifunc/pr18808b.c

First 500 lines of diff:
diff --git a/ChangeLog b/ChangeLog
index f8690be..1d080fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2015-08-07  H.J. Lu  <hongjiu.lu@intel.com>
+
+	Sync with GCC
+	2015-07-28  Ben Elliston  <bje@gnu.org>
+
+	* config.sub, config.guess: Import from upstream.
+
+2015-08-06  Yaakov Selkowitz  <yselkowi@redhat.com>
+
+	* Makefile.def (libiconv): Define bootstrap=true.
+	Mark pdf/html/info as missing.
+	(configure-gcc): Depend on all-libiconv.
+	(all-gcc): Ditto.
+	(configure-libcpp): Ditto.
+	(all-libcpp): Ditto.
+	(configure-intl): Ditto.
+	(all-intl): Ditto.
+	* Makefile.in: Regenerate.
+
 2015-07-27  H.J. Lu  <hongjiu.lu@intel.com>
 
 	Sync with GCC
diff --git a/Makefile.def b/Makefile.def
index 4394188..01445e4 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -93,9 +93,12 @@ host_modules= { module= libiberty-linker-plugin; bootstrap=true;
 		extra_make_flags='@extra_linker_plugin_flags@'; };
 // We abuse missing to avoid installing anything for libiconv.
 host_modules= { module= libiconv;
+		bootstrap=true;
 		extra_configure_flags='--disable-shared';
 		no_install= true;
-		missing= install-info;
+		missing= pdf;
+		missing= html;
+		missing= info;
 		missing= install-pdf;
 		missing= install-html;
 		missing= install-info; };
@@ -324,6 +327,7 @@ dependencies = { module=configure-gcc; on=all-gas; };
 dependencies = { module=configure-gcc; on=all-ld; };
 dependencies = { module=configure-gcc; on=all-gold; };
 dependencies = { module=configure-gcc; on=all-libelf; };
+dependencies = { module=configure-gcc; on=all-libiconv; };
 dependencies = { module=all-gcc; on=all-libiberty; hard=true; };
 dependencies = { module=all-gcc; on=all-intl; };
 dependencies = { module=all-gcc; on=all-mpfr; };
@@ -342,6 +346,7 @@ dependencies = { module=all-gcc; on=all-libdecnumber; hard=true; };
 dependencies = { module=all-gcc; on=all-libiberty; };
 dependencies = { module=all-gcc; on=all-fixincludes; };
 dependencies = { module=all-gcc; on=all-lto-plugin; };
+dependencies = { module=all-gcc; on=all-libiconv; };
 dependencies = { module=info-gcc; on=all-build-libiberty; };
 dependencies = { module=dvi-gcc; on=all-build-libiberty; };
 dependencies = { module=pdf-gcc; on=all-build-libiberty; };
@@ -353,8 +358,10 @@ dependencies = { module=install-strip-gcc ; on=install-strip-lto-plugin; };
 
 dependencies = { module=configure-libcpp; on=configure-libiberty; hard=true; };
 dependencies = { module=configure-libcpp; on=configure-intl; };
+dependencies = { module=configure-libcpp; on=all-libiconv; };
 dependencies = { module=all-libcpp; on=all-libiberty; hard=true; };
 dependencies = { module=all-libcpp; on=all-intl; };
+dependencies = { module=all-libcpp; on=all-libiconv; };
 
 dependencies = { module=all-fixincludes; on=all-libiberty; };
 
@@ -373,9 +380,11 @@ dependencies = { module=all-gotools; on=all-target-libgo; };
 
 dependencies = { module=all-utils; on=all-libiberty; };
 
+dependencies = { module=configure-intl; on=all-libiconv; };
 dependencies = { module=configure-mpfr; on=all-gmp; };
 dependencies = { module=configure-mpc; on=all-mpfr; };
 dependencies = { module=configure-isl; on=all-gmp; };
+dependencies = { module=all-intl; on=all-libiconv; };
 
 // Host modules specific to gdb.
 dependencies = { module=configure-gdb; on=all-intl; };
diff --git a/Makefile.in b/Makefile.in
index cfc1035..13f3740 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1079,7 +1079,9 @@ all-host: maybe-all-libiberty
 @if libiberty-linker-plugin-no-bootstrap
 all-host: maybe-all-libiberty-linker-plugin
 @endif libiberty-linker-plugin-no-bootstrap
+@if libiconv-no-bootstrap
 all-host: maybe-all-libiconv
+@endif libiconv-no-bootstrap
 all-host: maybe-all-m4
 all-host: maybe-all-readline
 all-host: maybe-all-sid
@@ -24134,7 +24136,6 @@ configure-libiconv: stage_current
 @if libiconv
 maybe-configure-libiconv: configure-libiconv
 configure-libiconv: 
-	@: $(MAKE); $(unstage)
 	@r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	test ! -f $(HOST_SUBDIR)/libiconv/Makefile || exit 0; \
@@ -24158,6 +24159,211 @@ configure-libiconv:
 
 
 
+.PHONY: configure-stage1-libiconv maybe-configure-stage1-libiconv
+maybe-configure-stage1-libiconv:
+@if libiconv-bootstrap
+maybe-configure-stage1-libiconv: configure-stage1-libiconv
+configure-stage1-libiconv:
+	@[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+	@$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGE1_TFLAGS)"; \
+	test ! -f $(HOST_SUBDIR)/libiconv/Makefile || exit 0; \
+	$(HOST_EXPORTS) \
+	CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+	CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
+	LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS;  \
+	echo Configuring stage 1 in $(HOST_SUBDIR)/libiconv; \
+	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv; \
+	cd $(HOST_SUBDIR)/libiconv || exit 1; \
+	case $(srcdir) in \
+	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+	  *) topdir=`echo $(HOST_SUBDIR)/libiconv/ | \
+		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+	esac; \
+	module_srcdir=libiconv; \
+	$(SHELL) $$s/$$module_srcdir/configure \
+	  --srcdir=$${topdir}/$$module_srcdir \
+	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+	  --target=${target_alias} \
+	   \
+	  $(STAGE1_CONFIGURE_FLAGS) \
+	  --disable-shared
+@endif libiconv-bootstrap
+
+.PHONY: configure-stage2-libiconv maybe-configure-stage2-libiconv
+maybe-configure-stage2-libiconv:
+@if libiconv-bootstrap
+maybe-configure-stage2-libiconv: configure-stage2-libiconv
+configure-stage2-libiconv:
+	@[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+	@$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGE2_TFLAGS)"; \
+	test ! -f $(HOST_SUBDIR)/libiconv/Makefile || exit 0; \
+	$(HOST_EXPORTS) \
+	$(POSTSTAGE1_HOST_EXPORTS) \
+	CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
+	CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
+	LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS;  \
+	echo Configuring stage 2 in $(HOST_SUBDIR)/libiconv; \
+	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv; \
+	cd $(HOST_SUBDIR)/libiconv || exit 1; \
+	case $(srcdir) in \
+	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+	  *) topdir=`echo $(HOST_SUBDIR)/libiconv/ | \
+		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+	esac; \
+	module_srcdir=libiconv; \
+	$(SHELL) $$s/$$module_srcdir/configure \
+	  --srcdir=$${topdir}/$$module_srcdir \
+	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+	  --target=${target_alias} \
+	  --with-build-libsubdir=$(HOST_SUBDIR) \
+	  $(STAGE2_CONFIGURE_FLAGS) \
+	  --disable-shared
+@endif libiconv-bootstrap
+
+.PHONY: configure-stage3-libiconv maybe-configure-stage3-libiconv
+maybe-configure-stage3-libiconv:
+@if libiconv-bootstrap
+maybe-configure-stage3-libiconv: configure-stage3-libiconv
+configure-stage3-libiconv:
+	@[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+	@$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGE3_TFLAGS)"; \
+	test ! -f $(HOST_SUBDIR)/libiconv/Makefile || exit 0; \
+	$(HOST_EXPORTS) \
+	$(POSTSTAGE1_HOST_EXPORTS) \
+	CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
+	CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
+	LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS;  \
+	echo Configuring stage 3 in $(HOST_SUBDIR)/libiconv; \
+	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv; \
+	cd $(HOST_SUBDIR)/libiconv || exit 1; \
+	case $(srcdir) in \
+	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+	  *) topdir=`echo $(HOST_SUBDIR)/libiconv/ | \
+		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+	esac; \
+	module_srcdir=libiconv; \
+	$(SHELL) $$s/$$module_srcdir/configure \
+	  --srcdir=$${topdir}/$$module_srcdir \
+	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+	  --target=${target_alias} \
+	  --with-build-libsubdir=$(HOST_SUBDIR) \
+	  $(STAGE3_CONFIGURE_FLAGS) \
+	  --disable-shared
+@endif libiconv-bootstrap
+
+.PHONY: configure-stage4-libiconv maybe-configure-stage4-libiconv
+maybe-configure-stage4-libiconv:
+@if libiconv-bootstrap
+maybe-configure-stage4-libiconv: configure-stage4-libiconv
+configure-stage4-libiconv:
+	@[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+	@$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGE4_TFLAGS)"; \
+	test ! -f $(HOST_SUBDIR)/libiconv/Makefile || exit 0; \
+	$(HOST_EXPORTS) \
+	$(POSTSTAGE1_HOST_EXPORTS) \
+	CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
+	CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
+	LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS;  \
+	echo Configuring stage 4 in $(HOST_SUBDIR)/libiconv; \
+	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv; \
+	cd $(HOST_SUBDIR)/libiconv || exit 1; \
+	case $(srcdir) in \
+	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+	  *) topdir=`echo $(HOST_SUBDIR)/libiconv/ | \
+		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+	esac; \
+	module_srcdir=libiconv; \
+	$(SHELL) $$s/$$module_srcdir/configure \
+	  --srcdir=$${topdir}/$$module_srcdir \
+	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+	  --target=${target_alias} \
+	  --with-build-libsubdir=$(HOST_SUBDIR) \
+	  $(STAGE4_CONFIGURE_FLAGS) \
+	  --disable-shared
+@endif libiconv-bootstrap
+
+.PHONY: configure-stageprofile-libiconv maybe-configure-stageprofile-libiconv
+maybe-configure-stageprofile-libiconv:
+@if libiconv-bootstrap
+maybe-configure-stageprofile-libiconv: configure-stageprofile-libiconv
+configure-stageprofile-libiconv:
+	@[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+	@$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGEprofile_TFLAGS)"; \
+	test ! -f $(HOST_SUBDIR)/libiconv/Makefile || exit 0; \
+	$(HOST_EXPORTS) \
+	$(POSTSTAGE1_HOST_EXPORTS) \
+	CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
+	CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
+	LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS;  \
+	echo Configuring stage profile in $(HOST_SUBDIR)/libiconv; \
+	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv; \
+	cd $(HOST_SUBDIR)/libiconv || exit 1; \
+	case $(srcdir) in \
+	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+	  *) topdir=`echo $(HOST_SUBDIR)/libiconv/ | \
+		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+	esac; \
+	module_srcdir=libiconv; \
+	$(SHELL) $$s/$$module_srcdir/configure \
+	  --srcdir=$${topdir}/$$module_srcdir \
+	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+	  --target=${target_alias} \
+	  --with-build-libsubdir=$(HOST_SUBDIR) \
+	  $(STAGEprofile_CONFIGURE_FLAGS) \
+	  --disable-shared
+@endif libiconv-bootstrap
+
+.PHONY: configure-stagefeedback-libiconv maybe-configure-stagefeedback-libiconv
+maybe-configure-stagefeedback-libiconv:
+@if libiconv-bootstrap
+maybe-configure-stagefeedback-libiconv: configure-stagefeedback-libiconv
+configure-stagefeedback-libiconv:
+	@[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+	@$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGEfeedback_TFLAGS)"; \
+	test ! -f $(HOST_SUBDIR)/libiconv/Makefile || exit 0; \
+	$(HOST_EXPORTS) \
+	$(POSTSTAGE1_HOST_EXPORTS) \
+	CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
+	CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
+	LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS;  \
+	echo Configuring stage feedback in $(HOST_SUBDIR)/libiconv; \
+	$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv; \
+	cd $(HOST_SUBDIR)/libiconv || exit 1; \
+	case $(srcdir) in \
+	  /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+	  *) topdir=`echo $(HOST_SUBDIR)/libiconv/ | \
+		sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+	esac; \
+	module_srcdir=libiconv; \
+	$(SHELL) $$s/$$module_srcdir/configure \
+	  --srcdir=$${topdir}/$$module_srcdir \
+	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+	  --target=${target_alias} \
+	  --with-build-libsubdir=$(HOST_SUBDIR) \
+	  $(STAGEfeedback_CONFIGURE_FLAGS) \
+	  --disable-shared
+@endif libiconv-bootstrap
+
+
+
 
 
 .PHONY: all-libiconv maybe-all-libiconv
@@ -24169,7 +24375,6 @@ all-libiconv: stage_current
 TARGET-libiconv=all
 maybe-all-libiconv: all-libiconv
 all-libiconv: configure-libiconv
-	@: $(MAKE); $(unstage)
 	@r=`${PWD_COMMAND}`; export r; \
 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
 	$(HOST_EXPORTS)  \
@@ -24180,6 +24385,255 @@ all-libiconv: configure-libiconv
 
 
 
+.PHONY: all-stage1-libiconv maybe-all-stage1-libiconv
+.PHONY: clean-stage1-libiconv maybe-clean-stage1-libiconv
+maybe-all-stage1-libiconv:
+maybe-clean-stage1-libiconv:
+@if libiconv-bootstrap
+maybe-all-stage1-libiconv: all-stage1-libiconv
+all-stage1: all-stage1-libiconv
+TARGET-stage1-libiconv = $(TARGET-libiconv)
+all-stage1-libiconv: configure-stage1-libiconv
+	@[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGE1_TFLAGS)"; \
+	$(HOST_EXPORTS)  \
+	cd $(HOST_SUBDIR)/libiconv && \
+	$(MAKE) $(BASE_FLAGS_TO_PASS) \
+		CFLAGS="$(STAGE1_CFLAGS)" \
+		CXXFLAGS="$(STAGE1_CXXFLAGS)" \
+		LIBCFLAGS="$(LIBCFLAGS)" \
+		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+		$(EXTRA_HOST_FLAGS)  \
+		$(STAGE1_FLAGS_TO_PASS)  \
+		TFLAGS="$(STAGE1_TFLAGS)" \
+		$(TARGET-stage1-libiconv)
+
+maybe-clean-stage1-libiconv: clean-stage1-libiconv
+clean-stage1: clean-stage1-libiconv
+clean-stage1-libiconv:
+	@if [ $(current_stage) = stage1 ]; then \
+	  [ -f $(HOST_SUBDIR)/libiconv/Makefile ] || exit 0; \
+	else \
+	  [ -f $(HOST_SUBDIR)/stage1-libiconv/Makefile ] || exit 0; \
+	  $(MAKE) stage1-start; \
+	fi; \
+	cd $(HOST_SUBDIR)/libiconv && \
+	$(MAKE) $(EXTRA_HOST_FLAGS)  \
+	$(STAGE1_FLAGS_TO_PASS)  clean
+@endif libiconv-bootstrap
+
+
+.PHONY: all-stage2-libiconv maybe-all-stage2-libiconv
+.PHONY: clean-stage2-libiconv maybe-clean-stage2-libiconv
+maybe-all-stage2-libiconv:
+maybe-clean-stage2-libiconv:
+@if libiconv-bootstrap
+maybe-all-stage2-libiconv: all-stage2-libiconv
+all-stage2: all-stage2-libiconv
+TARGET-stage2-libiconv = $(TARGET-libiconv)
+all-stage2-libiconv: configure-stage2-libiconv
+	@[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGE2_TFLAGS)"; \
+	$(HOST_EXPORTS) \
+	$(POSTSTAGE1_HOST_EXPORTS)  \
+	cd $(HOST_SUBDIR)/libiconv && \
+	$(MAKE) $(BASE_FLAGS_TO_PASS) \
+		CFLAGS="$(STAGE2_CFLAGS)" \
+		CXXFLAGS="$(STAGE2_CXXFLAGS)" \
+		LIBCFLAGS="$(STAGE2_CFLAGS)" \
+		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		TFLAGS="$(STAGE2_TFLAGS)" \
+		$(TARGET-stage2-libiconv)
+
+maybe-clean-stage2-libiconv: clean-stage2-libiconv
+clean-stage2: clean-stage2-libiconv
+clean-stage2-libiconv:
+	@if [ $(current_stage) = stage2 ]; then \
+	  [ -f $(HOST_SUBDIR)/libiconv/Makefile ] || exit 0; \
+	else \
+	  [ -f $(HOST_SUBDIR)/stage2-libiconv/Makefile ] || exit 0; \
+	  $(MAKE) stage2-start; \
+	fi; \
+	cd $(HOST_SUBDIR)/libiconv && \
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+@endif libiconv-bootstrap
+
+
+.PHONY: all-stage3-libiconv maybe-all-stage3-libiconv
+.PHONY: clean-stage3-libiconv maybe-clean-stage3-libiconv
+maybe-all-stage3-libiconv:
+maybe-clean-stage3-libiconv:
+@if libiconv-bootstrap
+maybe-all-stage3-libiconv: all-stage3-libiconv
+all-stage3: all-stage3-libiconv
+TARGET-stage3-libiconv = $(TARGET-libiconv)
+all-stage3-libiconv: configure-stage3-libiconv
+	@[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGE3_TFLAGS)"; \
+	$(HOST_EXPORTS) \
+	$(POSTSTAGE1_HOST_EXPORTS)  \
+	cd $(HOST_SUBDIR)/libiconv && \
+	$(MAKE) $(BASE_FLAGS_TO_PASS) \
+		CFLAGS="$(STAGE3_CFLAGS)" \
+		CXXFLAGS="$(STAGE3_CXXFLAGS)" \
+		LIBCFLAGS="$(STAGE3_CFLAGS)" \
+		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		TFLAGS="$(STAGE3_TFLAGS)" \
+		$(TARGET-stage3-libiconv)
+
+maybe-clean-stage3-libiconv: clean-stage3-libiconv
+clean-stage3: clean-stage3-libiconv
+clean-stage3-libiconv:
+	@if [ $(current_stage) = stage3 ]; then \
+	  [ -f $(HOST_SUBDIR)/libiconv/Makefile ] || exit 0; \
+	else \
+	  [ -f $(HOST_SUBDIR)/stage3-libiconv/Makefile ] || exit 0; \
+	  $(MAKE) stage3-start; \
+	fi; \
+	cd $(HOST_SUBDIR)/libiconv && \
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+@endif libiconv-bootstrap
+
+
+.PHONY: all-stage4-libiconv maybe-all-stage4-libiconv
+.PHONY: clean-stage4-libiconv maybe-clean-stage4-libiconv
+maybe-all-stage4-libiconv:
+maybe-clean-stage4-libiconv:
+@if libiconv-bootstrap
+maybe-all-stage4-libiconv: all-stage4-libiconv
+all-stage4: all-stage4-libiconv
+TARGET-stage4-libiconv = $(TARGET-libiconv)
+all-stage4-libiconv: configure-stage4-libiconv
+	@[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+	@r=`${PWD_COMMAND}`; export r; \
+	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+	TFLAGS="$(STAGE4_TFLAGS)"; \
+	$(HOST_EXPORTS) \
+	$(POSTSTAGE1_HOST_EXPORTS)  \
+	cd $(HOST_SUBDIR)/libiconv && \
+	$(MAKE) $(BASE_FLAGS_TO_PASS) \
+		CFLAGS="$(STAGE4_CFLAGS)" \
+		CXXFLAGS="$(STAGE4_CXXFLAGS)" \
+		LIBCFLAGS="$(STAGE4_CFLAGS)" \
+		CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+		LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+		$(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  \
+		TFLAGS="$(STAGE4_TFLAGS)" \
+		$(TARGET-stage4-libiconv)
+
+maybe-clean-stage4-libiconv: clean-stage4-libiconv
+clean-stage4: clean-stage4-libiconv
+clean-stage4-libiconv:
+	@if [ $(current_stage) = stage4 ]; then \
+	  [ -f $(HOST_SUBDIR)/libiconv/Makefile ] || exit 0; \
+	else \
+	  [ -f $(HOST_SUBDIR)/stage4-libiconv/Makefile ] || exit 0; \
+	  $(MAKE) stage4-start; \
+	fi; \
+	cd $(HOST_SUBDIR)/libiconv && \
+	$(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS)  clean
+@endif libiconv-bootstrap
+
+
+.PHONY: all-stageprofile-libiconv maybe-all-stageprofile-libiconv
+.PHONY: clean-stageprofile-libiconv maybe-clean-stageprofile-libiconv
+maybe-all-stageprofile-libiconv:
+maybe-clean-stageprofile-libiconv:
+@if libiconv-bootstrap


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] 4+ messages in thread
* [SCM]  jankratochvil/gdbserverbuildid-locate: sticky
@ 2015-08-05 20:59 jkratoch
  0 siblings, 0 replies; 4+ messages in thread
From: jkratoch @ 2015-08-05 20:59 UTC (permalink / raw)
  To: archer-commits

The branch, jankratochvil/gdbserverbuildid-locate has been updated
  discards  c4548a84652950f57463d70603dde29f066bdb0b (commit)
  discards  cce9f46b5c424e1ac224b6f081308b065cb8b61e (commit)
  discards  a66162093d3d97b2deef4e844baf5268e6f80651 (commit)
  discards  0f8e3a26b93c75ed92e165651a176260086d9a1e (commit)
  discards  51f724cbca43668c451c2a9f22057a783515d67e (commit)
  discards  f674b145edf0fe8ea6eac606cc3098317e5291c0 (commit)
  discards  e8d83eaa0768cf05ec40d4fd32c44f5b414987d9 (commit)
  discards  b41d3e6c42587da057ac45f12619c5aec027dfd2 (commit)
  discards  a1030db283121514b653580dbc28b675aa392b84 (commit)
  discards  96894af66352751e2650141735170719faf38252 (commit)
  discards  ded23229bf6337eb9f06bff14e9548149a4494b5 (commit)
  discards  512599fc5f3cab287166d3499c26c5b8dca784dc (commit)
  discards  dfd6a88cfa6295b698c69638ee0e9474efe27089 (commit)
  discards  98e5ee5efc518de4732105a5933405fc23f1373b (commit)
  discards  91c65e38f4f062a62f03b24a0baa83bd2be50e2e (commit)
  discards  b21e77c8e9b0a072da23b73c0594ff660084da5e (commit)
  discards  ab326528f9b1a06436b436f8873ec918d3cf5792 (commit)
  discards  3631dfc83cbb62db32f9ffe607aabd34f5a35d39 (commit)
  discards  d8f77df297b7bd174d96feccd2ad1f43164c3dfc (commit)
  discards  4e8b7950c90b91692d3b3660c4d47464d5081013 (commit)
  discards  77349f9a27c0b1ad34a16b8245dd8f89663a6b99 (commit)
  discards  d0ec4ffa44abbfb3ae91d073d9e173d08add716a (commit)
  discards  53ecd8abae0b52b4972c15d71174e0ba0f141976 (commit)
  discards  90f484011751e127565e5600bfde5308773edb93 (commit)
  discards  0ad719190dd1375219d3bcdc3718daf109dff476 (commit)
       via  d11dfeff36085e72697b0935fa9ea7b478502be3 (commit)
       via  5bb913190de7ef138463e6dac4fd4161e00a352b (commit)
       via  652d48b40862076ce2bf51dfa3cf721e51be78d6 (commit)
       via  5ff39b6e672dd158110b59091137c51558e8a17a (commit)
       via  c9a2870e237c57bd791a761f35a3657c405388c0 (commit)
       via  aba047ecde86b2aca84b6ea403645dbc6dfda4f9 (commit)
       via  7b78ff694e36c0391a51d08764c9070eb864fcab (commit)
       via  1fb2a28254f3fa02b876e7c9eac8ed50fad20b3c (commit)
       via  29ae97c2a99b590f7a1e5fce610bb07562fb77b4 (commit)
       via  2858b417b03809d653a1b432adfc1e05ba8e2eca (commit)
       via  a3110c7b4bb8e1d8705e72c5d7aa31e2e889f34d (commit)
       via  111af182305566a065841f51a42e48d34e4159fa (commit)
       via  c291ee26e669f02ae872956ad5f39263d7351a7d (commit)
       via  108dd1aa6d678f8b2f3938eb9854502c2ceb4c1f (commit)
       via  5f7f919b9f15e4158eaa9ba8d1865182a29ff5fb (commit)
       via  028d23ba5152daa5c59a7f85bd3a08c2ba93ae68 (commit)
       via  fd1312a6b9f9a54c69ca6852a5e305213dfe7fd5 (commit)
       via  a61ca3ebe307358102d7a172ef8ec39cd02e9db7 (commit)
       via  38e9eefa67fd1b6dbc477227bb2aca8f8ed81ccc (commit)
       via  d4ce568a895cd2567bf06f4be2e51e9417401fc4 (commit)
       via  c37f1754c8e7fc3993edf9be4f959823508fd4b2 (commit)
       via  903dc1fe73d28ed8cfb49e2639438529084568cd (commit)
       via  04f4385dea44eb3b377181c2aef85c420ce7bfbd (commit)
       via  fa4273cdac197b1ee9bd9ced0302ad6cb81baad9 (commit)
       via  e9ca80639af74cbc23b266e1bf7a4abd2fb63e7a (commit)
       via  d02982822a709b5ccfcddeeaf6a2648bcecff266 (commit)
       via  99416e9384ecd012925eaaaa1ded88df88d37546 (commit)
       via  0a39bb3218ec528236da4953a97d07f0da9313ce (commit)
       via  63b9bbb7d7bcdcb6e0f59dd8da9615d80c537b8d (commit)
       via  260439cb8ec21ffd75b240aadc55fd341c8c8dd4 (commit)
       via  32f25203b47b1823bf77724e3eb7bbd15ca3e429 (commit)
       via  d89fa914ad6f10cf2827df9b3b86da1a7d9ddfd8 (commit)
       via  ea546fbb602046f4681319971bc7d5044d04f116 (commit)
       via  4efd80aa8a99adbb38d0719ba56b07c9970793b5 (commit)
       via  7e27a9d5f22f9f7ead11738b1546d0b5c737266b (commit)
       via  4e13f8fb05eb7ffd163d96e519cc011d8d21e3d7 (commit)
       via  524b57e6b3a36e0ce6573bbc4dba9f0bd9c165b1 (commit)
       via  6085d6f69562472c389679052dcfe66cf3068a76 (commit)
       via  8a7e4587c4e7d78ebbb9bcc0e65bc03f784fde6b (commit)
       via  3b53ae99fbb6bea515284f725b83125d09cfea6f (commit)
       via  bd9e6534b7be7a228ce339bced963d2d15856390 (commit)
       via  ded48a5ef34314f7af698b7ec7916b084c94b18d (commit)
       via  c6343a91d94e9516afe56dfe85e435922bd9ea04 (commit)
       via  978b9495b78054b76052a09064cae8c94a58b93e (commit)
       via  9c98104c4c8f558176311dad055897c45b7d8032 (commit)
       via  bb57e4c7bd1d27c45195efd0b7a612bac831d2df (commit)
       via  0a61824343c98b9440fe13752f800d65f765c4c1 (commit)
       via  96e9210fd6fecc1926559dbfa45e7c7c59f7d821 (commit)
       via  beab5d94abdbea50febb1e189198fdec43db47c9 (commit)
       via  edc66de9a5883295bb32fad2c87bf4c62f97f54a (commit)
       via  a26b73ed2d90d6ef080810fa9dd166b43e8a3eb7 (commit)
       via  127fcdff0541697ffd7169abafe5a51118bf65d0 (commit)
       via  4122b41366b2e810bbf016d7c5514a496f0aca86 (commit)
       via  af60a1ef46d2c4aca22868b0f2819234b949018e (commit)
       via  cb1c8103f13d413e05ca6e61e21b56bba3baae74 (commit)
       via  ee2d2b102071f89a04f93f0434df818f69ef1e50 (commit)
       via  666fcf91c0117da8294207f631df5a97fdc4157c (commit)
       via  c8bd4544607d4f41b89b78630fc233f53f90b6a2 (commit)
       via  8e1afc817ca50aec1e77b5bd2613844bb4b4d932 (commit)
       via  4e1bdb00c63a839037f31f005349c87702d50cfe (commit)
      from  c4548a84652950f57463d70603dde29f066bdb0b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit d11dfeff36085e72697b0935fa9ea7b478502be3
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:41:00 2015 +0200

    sticky
    
    Message-Id: <1433754079-10395-1-git-send-email-gbenson@redhat.com>
    
    Philippe Waroquiers wrote:
    > On Fri, 2015-06-05 at 12:22 +0100, Gary Benson wrote:
    > > Built and regtested on RHEL6.6 x86_64.
    > I tested with the last SVN version of the Valgrind gdbserver (that
    > supports qXfer:exec-file:read+).
    >
    > The patch introduces a regression:
    > with the patch, GDB does not anymore automatically load the
    > exec-file.
    >
    > I bypassed this problem by ignoring fake_pid_p in remote.c:
    > --- a/gdb/remote.c
    > +++ b/gdb/remote.c
    > @@ -1624,9 +1624,13 @@ remote_add_inferior (int fake_pid_p, int pid, int
    > attached,
    >    inf->attach_flag = attached;
    >    inf->fake_pid_p = fake_pid_p;
    >
    > -  /* If no main executable is currently open then attempt to
    > -     open the file that was executed to create this inferior.  */
    > -  if (try_open_exec && get_exec_file (0) == NULL)
    > +  /* Attempt to open the file that was executed to create this
    > +     inferior.  If the user has explicitly specified executable
    > +     and/or symbol files then warn the user if their choices do
    > +     not match.  Otherwise, set exec_file and symfile_objfile to
    > +     the new file.  */
    > +  printf("fake_pid_p %d\n", fake_pid_p);
    > +  if (try_open_exec)// && !fake_pid_p)
    >      exec_file_locate_attach (pid, 1);
    >
    > Effectively, the printf shows that with Valgrind gdbsrv,
    > fake_pid_p value is 1.
    >
    > When ignoring fake_pid_p, GDB can properly attach
    > to different Valgrind gdbsrv, and changes of executable
    > as expected.
    
    Ah, it seems I mailed a bad patch, my apologies!  I was working on
    two fixes that touched the same line, and it looks like I rebased
    them in the wrong order.
    
    This updated patch has been created against the latest gdb/master
    (80fb91378c91a8239817a5ab2b1c3e346109db25).  Could you please try
    your tests again?
    
    Thanks,
    Gary
    
    
    ---
    On attach, GDB will only attempt to determine the main executable's
    filename if one is not already set.  This causes problems if you
    attach to one process and then attach to another: GDB will not attempt
    to discover the main executable on the second attach.  If the two
    processes have different main executable files then the symbols will
    now be wrong.  This is PR gdb/17626.
    
    In GDB some filenames are supplied by the user (e.g. using the "file"
    or "symbol-file" commands) and some are determined by GDB (e.g. while
    processing an "attach" command).  This commit updates GDB to track
    which filenames were supplied by the user.  When GDB might attempt to
    determine an executable filename and one is already set, filenames
    determined by GDB may be overridden but user-supplied filenames will
    not.
    
    gdb/ChangeLog:
    
    	PR gdb/17626
    	* progspace.h (struct program_space)
    	<pspace_exec_file_is_user_supplied>: New field.
    	<symfile_object_file_is_user_supplied>: Likewise.
    	(symfile_objfile_is_user_supplied): New macro.
    	* exec.h (exec_file_is_user_supplied): Likewise.
    	* exec.c (exec_close): Clear exec_file_is_user_supplied.
    	(exec_file_locate_attach): Remove get_exec_file check.
    	Do not replace user-supplied executable or symbol files.
    	Warn if user-supplied executable or symbol files do not
    	match discovered file.
    	(exec_file_command): Set exec_file_is_user_supplied.
    	* symfile.c (symbol_file_clear): Clear
    	symfile_objfile_is_user_supplied.
    	(symbol_file_command): Set symfile_objfile_is_user_supplied.
    	* inferior.c (add_inferior_command): Set
    	exec_file_is_user_supplied and symfile_objfile_is_user_supplied.
    	* main.c (captured_main): Likewise.
    	* infcmd.c (attach_command_post_wait): Always call
    	exec_file_locate_attach.  Only call reopen_exec_file and
    	reread_symbols if exec_file_is_user_supplied.
    	* remote.c (remote_add_inferior): Remove get_exec_file check
    	around exec_file_locate_attach.

commit 5bb913190de7ef138463e6dac4fd4161e00a352b
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:34 2015 +0200

    mainbuildid

commit 652d48b40862076ce2bf51dfa3cf721e51be78d6
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:33 2015 +0200

    hexallocate

commit 5ff39b6e672dd158110b59091137c51558e8a17a
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:33 2015 +0200

    locatetest

commit c9a2870e237c57bd791a761f35a3657c405388c0
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:33 2015 +0200

    buildidwarn

commit aba047ecde86b2aca84b6ea403645dbc6dfda4f9
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:33 2015 +0200

    buildidsolibbfdopen

commit 7b78ff694e36c0391a51d08764c9070eb864fcab
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:32 2015 +0200

    buildidverify

commit 1fb2a28254f3fa02b876e7c9eac8ed50fad20b3c
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:32 2015 +0200

    buildidsolibsearch

commit 29ae97c2a99b590f7a1e5fce610bb07562fb77b4
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:32 2015 +0200

    buildidtofile

commit 2858b417b03809d653a1b432adfc1e05ba8e2eca
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:32 2015 +0200

    buildidproto

commit a3110c7b4bb8e1d8705e72c5d7aa31e2e889f34d
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:31 2015 +0200

    buildidtobfd

commit 111af182305566a065841f51a42e48d34e4159fa
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:31 2015 +0200

    buildidforcemove

commit c291ee26e669f02ae872956ad5f39263d7351a7d
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:31 2015 +0200

    buildidfreefix

commit 108dd1aa6d678f8b2f3938eb9854502c2ceb4c1f
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:30 2015 +0200

    unvalidate

commit 5f7f919b9f15e4158eaa9ba8d1865182a29ff5fb
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:30 2015 +0200

    openpsymfile

commit 028d23ba5152daa5c59a7f85bd3a08c2ba93ae68
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:30 2015 +0200

    openpsolib

commit fd1312a6b9f9a54c69ca6852a5e305213dfe7fd5
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:30 2015 +0200

    openp

commit a61ca3ebe307358102d7a172ef8ec39cd02e9db7
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:29 2015 +0200

    filelib

commit 38e9eefa67fd1b6dbc477227bb2aca8f8ed81ccc
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:29 2015 +0200

    targetfd

commit d4ce568a895cd2567bf06f4be2e51e9417401fc4
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:29 2015 +0200

    openpnullpathname

commit c37f1754c8e7fc3993edf9be4f959823508fd4b2
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:28 2015 +0200

    openpmode

commit 903dc1fe73d28ed8cfb49e2639438529084568cd
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:28 2015 +0200

    openppath

commit 04f4385dea44eb3b377181c2aef85c420ce7bfbd
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:28 2015 +0200

    openpenum

commit fa4273cdac197b1ee9bd9ced0302ad6cb81baad9
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 21:28:28 2015 +0200

    sysrootdelim

commit e9ca80639af74cbc23b266e1bf7a4abd2fb63e7a
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Wed Aug 5 22:55:04 2015 +0200

    sysrootconst

commit d02982822a709b5ccfcddeeaf6a2648bcecff266
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Fri Jul 17 22:31:05 2015 +0200

    build-id: -config,+configure.tgt

commit 99416e9384ecd012925eaaaa1ded88df88d37546
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Fri Jul 17 22:30:32 2015 +0200

    Revert "Revert the previous 7 commits of: Validate binary before use"
    
    This reverts commit db1ff28b60f8886b8d7c634f1db2f939ba47a13c.
    
    Conflicts:
    	gdb/ChangeLog
    	gdb/gdbserver/ChangeLog
    	gdb/testsuite/ChangeLog

commit 0a39bb3218ec528236da4953a97d07f0da9313ce
Author: Pedro Alves <palves@redhat.com>
Date:   Wed Aug 5 20:01:42 2015 +0100

    stepping is disturbed by setjmp/longjmp | try/catch in other threads
    
    At https://sourceware.org/ml/gdb-patches/2015-08/msg00097.html, Joel
    observed that trying to next/step a program on GNU/Linux sometimes
    results in the following failed assertion:
    
    	% gdb -q .obj/gprof/main
        (gdb) start
        (gdb) n
        (gdb) step
        [...]/infrun.c:2391: internal-error:
        resume: Assertion `sig != GDB_SIGNAL_0' failed.
    
    What happened is that, during the "next" operation, GDB hit a
    longjmp/exception/step-resume breakpoint but failed to see that this
    breakpoint was set for a different thread than the one being stepped.
    
    Joel's detailed analysis follows:
    
    More precisely, at the end of the "start" command, we are stopped at
    the start of function Main in main.adb; there are 4 threads in total,
    and we are in the main thread (which is thread 1):
    
        (gdb) info thread
          Id   Target Id         Frame
          4    Thread 0xb7a56ba0 (LWP 28379) 0xffffe410 in __kernel_vsyscall ()
          3    Thread 0xb7c5aba0 (LWP 28378) 0xffffe410 in __kernel_vsyscall ()
          2    Thread 0xb7e5eba0 (LWP 28377) 0xffffe410 in __kernel_vsyscall ()
        * 1    Thread 0xb7ea18c0 (LWP 28370) main () at /[...]/main.adb:57
    
    All the logs below reference Thread ID/LWP, but it'll be easier to
    talk about the threads by GDB thread number.  For instance, thread 1
    is LWP 28370 while thread 3 is LWP 28378.  So, the explanations below
    translate the LWPs into thread numbers.
    
    Back to what happens while we are trying to "next' our program:
        (gdb) n
        infrun: clear_proceed_status_thread (Thread 0xb7a56ba0 (LWP 28379))
        infrun: clear_proceed_status_thread (Thread 0xb7c5aba0 (LWP 28378))
        infrun: clear_proceed_status_thread (Thread 0xb7e5eba0 (LWP 28377))
        infrun: clear_proceed_status_thread (Thread 0xb7ea18c0 (LWP 28370))
        infrun: proceed (addr=0xffffffff, signal=GDB_SIGNAL_DEFAULT)
        infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0xb7ea18c0 (LWP 28370)] at 0x805451e
        infrun: target_wait (-1.0.0, status) =
        infrun:   28370.28370.0 [Thread 0xb7ea18c0 (LWP 28370)],
        infrun:   status->kind = stopped, signal = GDB_SIGNAL_TRAP
        infrun: TARGET_WAITKIND_STOPPED
        infrun: stop_pc = 0x8054523
    
    We've resumed thread 1 (LWP 28370), and received in return a signal
    that the same thread stopped slightly further.  It's still in the
    range of instructions for the line of source we started the "next"
    from, as evidenced by the following trace...
    
        infrun: stepping inside range [0x805451e-0x8054531]
    
    ... and thus, we decide to continue stepping the same thread:
    
        infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0xb7ea18c0 (LWP 28370)] at 0x8054523
        infrun: prepare_to_wait
    
    That's when we get an event from a different thread (thread 3)...
    
        infrun: target_wait (-1.0.0, status) =
        infrun:   28370.28378.0 [Thread 0xb7c5aba0 (LWP 28378)],
        infrun:   status->kind = stopped, signal = GDB_SIGNAL_TRAP
        infrun: TARGET_WAITKIND_STOPPED
        infrun: stop_pc = 0x80782d0
        infrun: context switch
        infrun: Switching context from Thread 0xb7ea18c0 (LWP 28370) to Thread 0xb7c5aba0 (LWP 28378)
    
    ... which we find to be at the address where we set a breakpoint on
    "the unwinder debug hook" (namely "_Unwind_DebugHook").  But GDB fails
    to notice that the breakpoint was inserted for thread 1 only, and so
    decides to handle it as...
    
        infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME
    
    ... and inserts a breakpoint at the corresponding resume address, as
    evidenced by this the next log:
    
        infrun: exception resume at 80542a2
    
    That breakpoint seems innocent right now, but will play a role fairly
    quickly.  But for now, GDB has inserted the exception-resume
    breakpoint, and needs to single-step thread 3 past the breakpoint it
    just hit.  Thus, it temporarily disables the exception breakpoint, and
    requests a step of that thread:
    
        infrun: skipping breakpoint: stepping past insn at: 0x80782d0
        infrun: skipping breakpoint: stepping past insn at: 0x80782d0
        infrun: skipping breakpoint: stepping past insn at: 0x80782d0
        infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=1, current thread [Thread 0xb7c5aba0 (LWP 28378)] at 0x80782d0
        infrun: prepare_to_wait
    
    We then get a notification, still from thread 3, that it's now past
    that breakpoint...
    
        infrun: prepare_to_wait
        infrun: target_wait (-1.0.0, status) =
        infrun:   28370.28378.0 [Thread 0xb7c5aba0 (LWP 28378)],
        infrun:   status->kind = stopped, signal = GDB_SIGNAL_TRAP
        infrun: TARGET_WAITKIND_STOPPED
        infrun: stop_pc = 0x8078424
    
    ... so we can resume what we were doing before, which is single-stepping
    thread 1 until we get to a new line of code:
    
        infrun: switching back to stepped thread
        infrun: Switching context from Thread 0xb7c5aba0 (LWP 28378) to Thread 0xb7ea18c0 (LWP 28370)
        infrun: expected thread still hasn't advanced
        infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=0, current thread [Thread 0xb7ea18c0 (LWP 28370)] at 0x8054523
    
    The "resume" log above shows that we're resuming thread 1 from where
    we left off (0x8054523).  We get one more stop at 0x8054529, which is
    still inside our stepping range so we go again.  That's when we get
    the following event, from thread 3:
    
        infrun: prepare_to_wait
        infrun: target_wait (-1.0.0, status) =
        infrun:   28370.28378.0 [Thread 0xb7c5aba0 (LWP 28378)],
        infrun:   status->kind = stopped, signal = GDB_SIGNAL_TRAP
        infrun: TARGET_WAITKIND_STOPPED
        infrun: stop_pc = 0x80542a2
    
    Now the stop_pc address is interesting, because it's the address of
    "exception resume" breakpoint...
    
        infrun: context switch
        infrun: Switching context from Thread 0xb7ea18c0 (LWP 28370) to Thread 0xb7c5aba0 (LWP 28378)
        infrun: BPSTAT_WHAT_CLEAR_LONGJMP_RESUME
    
    ... and since that location is at a different line of code, this is
    where it decides the "next" operation should stop:
    
        infrun: stop_waiting
        [Switching to Thread 0xb7c5aba0 (LWP 28378)]
        0x080542a2 in inte_tache_rt.ttache_rt (
            <_task>=0x80968ec <inte_tache_rt_inst.tache2>)
            at /[...]/inte_tache_rt.adb:54
        54            end loop;
    
    However, what GDB should have noticed earlier that the exception
    breakpoint we hit was for a different thread, thus should have
    single-stepped that thread out of the breakpoint _without_ inserting
    the exception-return breakpoint, and then resumed the single-stepping
    of the initial thread (thread 1) until that thread stepped out of its
    stepping range.
    
    This is what this patch does, and after applying it, GDB now correctly
    stops on the next line of code.
    
    The patch adds a C++ test that exercises this, both for setjmp/longjmp
    and exception breakpoints.  With an unpatched GDB it shows:
    
     (gdb) next
     [Switching to Thread 22445.22455]
     thread_try_catch (arg=0x0) at /home/pedro/gdb/mygit/build/../src/gdb/testsuite/gdb.threads/next-other-thr-longjmp.c:59
     59            catch (...)
     (gdb) FAIL: gdb.threads/next-other-thr-longjmp.exp: next to line 1
     next
     /home/pedro/gdb/mygit/build/../src/gdb/infrun.c:4865: internal-error: process_event_stop_test: Assertion `ecs->event_thread->control.exception_resume_breakpoint != NULL' fa
     iled.
     A problem internal to GDB has been detected,
     further debugging may prove unreliable.
     Quit this debugging session? (y or n) FAIL: gdb.threads/next-other-thr-longjmp.exp: next to line 2 (GDB internal error)
     Resyncing due to internal error.
     n
    
    Tested on x86_64-linux, no regressions.
    
    gdb/ChangeLog:
    2015-08-05  Pedro Alves  <palves@redhat.com>
    	    Joel Brobecker  <brobecker@adacore.com>
    
            * breakpoint.c (bpstat_what) <bp_longjmp, bp_longjmp_call_dummy>
    	<bp_exception, bp_longjmp_resume, bp_exception_resume>: Handle the
    	case where BS->STOP is not set.
    
    gdb/testsuite/ChangeLog:
    2015-08-05  Pedro Alves  <palves@redhat.com>
    
    	* gdb.threads/next-while-other-thread-longjmps.c: New file.
    	* gdb.threads/next-while-other-thread-longjmps.exp: New file.

commit 63b9bbb7d7bcdcb6e0f59dd8da9615d80c537b8d
Author: Nick Clifton <nickc@redhat.com>
Date:   Wed Aug 5 16:16:39 2015 +0100

    Change the behaviour of the --only-keep-debug option to objcopy and strip so that the sh_link and sh_info fields in stripped section headers are preserved.
    
    bfd	* elf.c (_bfd_elf_copy_private_bfd_data): Copy the sh_link and
    	sh_info fields of sections whose type has been changed to
    	SHT_NOBITS.
    
    bin	* doc/binutils.texi: Document that the --only-keep-debug option
    	to strip and objcopy preserves the section headers of stripped
    	sections.
    
    tests	* binutils-all/objcopy.exp (keep_debug_symbols_and_check_links):
    	New proc.  Checks that debug-info-only binaries retain the
    	sh_link field in stripped sections.

commit 260439cb8ec21ffd75b240aadc55fd341c8c8dd4
Author: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Date:   Wed Aug 5 16:30:57 2015 +0200

    Protect nat/gdb_thread_db.h against multiple inclusion.
    
    Fixes a build error due to typedef redefinition with some compilers.
    
    Also added missing copyright header.
    
    gdb/
    	* nat/gdb_thread_db.h: Add copyright header.
    	Protect against multiple inclusion.

commit 32f25203b47b1823bf77724e3eb7bbd15ca3e429
Author: Nick Clifton <nickc@redhat.com>
Date:   Wed Aug 5 14:58:21 2015 +0100

    Fix building GDB for the M32C by providing a stub sim_info function.
    
    	* gdb-if.c (sim_info): Stub function to allow GDB to be built
    	with this simulator.

commit d89fa914ad6f10cf2827df9b3b86da1a7d9ddfd8
Author: Yao Qi <yao.qi@linaro.org>
Date:   Wed Aug 5 08:41:19 2015 +0100

    Remove get_thread_id
    
    This patch removes get_thread_id from aarch64-linux-nat.c,
    arm-linux-nat.c and xtensa-linux-nat.c.
    
    get_thread_id was added in this commit below in 2000,
    
      41c49b06c471443d3baf2eaa2463a315f9b5edca
      https://sourceware.org/ml/gdb-patches/2000-04/msg00398.html
    
    which predates the ptid_t stuff added into GDB.  Nowadays, lwpid of
    inferior_ptid is only zero when the inferior is created (in
    fork-child.c:fork_inferior) and its lwpid will be set after
    linux_nat_wait_1 gets the first event.  After that, lwpid of
    inferior_ptid is not zero for linux-nat target, then we can use
    ptid_get_lwp, so this function isn't needed anymore.
    
    Even when GDB attaches to a process, the lwp of inferior_ptid
    isn't zero,  see linux-nat.c:linux_nat_attach,
    
      /* The ptrace base target adds the main thread with (pid,0,0)
         format.  Decorate it with lwp info.  */
      ptid = ptid_build (ptid_get_pid (inferior_ptid),
    		     ptid_get_pid (inferior_ptid),
    		     0);
    
    Note that linux_nat_xfer_partial shifts lwpid to pid for inferior_ptid
    temperately for calling linux_ops->to_xfer_partial, but all the
    affected functions in this patch are not called in
    linux_ops->to_xfer_partial.
    
    I think we can safely remove get_thread_id for all linux native targets.
    
    Regression tested on arm-linux and aarch64-linux.  Unable to build
    native GDB and test it on xtensa-linux.
    
    gdb:
    
    2015-08-05  Yao Qi  <yao.qi@linaro.org>
    
    	* aarch64-linux-nat.c (get_thread_id): Remove.
    	(debug_reg_change_callback): Call ptid_get_lwp instead of
    	get_thread_id.
    	(fetch_gregs_from_thread): Likewise.
    	(store_gregs_to_thread): Likewise.
    	(fetch_fpregs_from_thread): Likewise.
    	(store_fpregs_to_thread): Likewise.
    	(aarch64_linux_get_debug_reg_capacity): Likewise.
    	* arm-linux-nat.c (get_thread_id): Remove.
    	(GET_THREAD_ID): Update macro to use ptid_get_lwp.
    	* xtensa-linux-nat.c (get_thread_id): Remove.
    	(GET_THREAD_ID): Update macro to use ptid_get_lwp.
    	* arm-linux-nat.c (get_thread_id): Remove.
    	(GET_THREAD_ID): Remove.
    	(fetch_fpregs): Call ptid_get_lwp instead of GET_THREAD_ID.
    	(store_fpregs, fetch_regs, store_regs): Likewise.
    	(fetch_wmmx_regs, store_wmmx_regs): Likewise.
    	(fetch_vfp_regs, store_vfp_regs): Likewise.
    	(arm_linux_read_description): Likewise.
    	(arm_linux_get_hwbp_cap): Likewise.
    	* xtensa-linux-nat.c (get_thread_id): Remove.
    	(GET_THREAD_ID): Remove.
    	(fetch_gregs, store_gregs): Call ptid_get_lwp instead of
    	GET_THREAD_ID.

commit ea546fbb602046f4681319971bc7d5044d04f116
Author: GDB Administrator <gdbadmin@sourceware.org>
Date:   Wed Aug 5 00:00:08 2015 +0000

    Automatic date update in version.in

commit 4efd80aa8a99adbb38d0719ba56b07c9970793b5
Author: Ciro Santilli <ciro.santilli@gmail.com>
Date:   Tue Aug 4 09:03:15 2015 -0700

    python: fix Linetable case to LineTable in docstrings and comments
    
    The class is called LineTable, not Linetable, as specified by
    py-linetable.c/gdbpy_initialize_linetable:
    
        if (gdb_pymodule_addobject (gdb_module, "LineTable",
    
    gdb/ChangeLog:
    
            * python/py-linetable.c: Fix case of Linetable to LineTable
            in docstrings and code comments.
            * python/py-symtab.c: Same.

commit 7e27a9d5f22f9f7ead11738b1546d0b5c737266b
Author: Yuriy M. Kaminskiy <yumkam@gmail.com>
Date:   Tue Aug 4 16:51:53 2015 +0100

    Fix stack buffer overflows when parsing corrupt ihex files.
    
    	PR binutils/18750
    	* ihex.c (ihex_scan): Fixes incorrect escape sequence in error message
    	and stack overflow when char is signed and \200-\376 was in place of hex
    	digit; also fixes \377 was handled as EOF instead of "incorrect character".
    	(ihex_read_section): Changed for consistency.
    	(ihex_bad_byte): Prevent (now impossible to trigger) stack
    	overflow and incorrect escape sequence handling.
    	* srec.c (srec_bad_byte): Likewise.
    
    	* readelf.c (process_mips_specific): Fix incorrect escape
    	sequence handling.

commit 4e13f8fb05eb7ffd163d96e519cc011d8d21e3d7
Author: Nick Clifton <nickc@redhat.com>
Date:   Tue Aug 4 14:50:40 2015 +0100

    Fix memory leak in ar if it encounters an invalid path whilst extracting files.
    
    	* ar.c (extract_file): Free cbuf if the path is invalid.

commit 524b57e6b3a36e0ce6573bbc4dba9f0bd9c165b1
Author: Yao Qi <yao.qi@linaro.org>
Date:   Tue Aug 4 14:34:14 2015 +0100

    Disable tracepoint support for aarch32
    
    We only support tracepoint for aarch64.  Although arm program can run
    on aarch64, GDBserver doesn't support tracepoint for it.
    
    gdb/gdbserver:
    
    2015-08-04  Yao Qi  <yao.qi@linaro.org>
    
    	* linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
    	if current_thread is 32 bit.

commit 6085d6f69562472c389679052dcfe66cf3068a76
Author: Yao Qi <yao.qi@linaro.org>
Date:   Tue Aug 4 14:34:14 2015 +0100

    Disable Z0 packet on aarch64 on multi-arch debugging
    
    In multi-arch debugging, if GDB sends Z0 packet, GDBserver should be
    able to do several things below:
    
     - choose the right breakpoint instruction to insert according to the
       information available, such as 'kind' in Z0 packet and address,
    
     - choose the right breakpoint instruction to check memory writes and
       validate inserted memory breakpoint
    
     - be aware of different breakpoint instructions in $ARCH_breakpoint_at.
    
    unfortunately GDBserver can't do them now.  Although x86 GDBserver
    supports multi-arch, it doesn't need to support them above because
    breakpoint instruction on i686 and x86_64 is the same.  However,
    breakpoint instructions on aarch64 and arm (arm mode, thumb1, and thumb2)
    are different.
    
    I tried to teach aarch64 GDBserver backend to be really
    multi-arch-capable in the following ways,
    
     - linux_low_target return the right breakpoint instruction according to
       the 'kind' in Z0 packet, and insert_memory_breakpoint can do the right
       thing.
     - once breakpoint is inserted, the breakpoint data and length is recorded
       in each breakpoint object, so that validate_breakpoint and
       check_mem_write can get the right breakpoint instruction from each
       breakpoint object, rather than from global variable breakpoint_data.
     - linux_low_target needs another hook function for pc increment after
       hitting a breakpoint.
     - let set_breakpoint_at, which is widely used for tracepoint, use the
       'default' breakpoint instruction.  We can always use aarch64 breakpoint
       instruction since arm doesn't support tracepoint yet.
    
    looks it is not a small piece of work, so I decide to disable Z0 packet
    on multi-arch, which means aarch64 GDBserver only supports Z0 packet
    if it is started to debug only one process (extended protocol is not
    used) and process target description is 64-bit.
    
    gdb/gdbserver:
    
    2015-08-04  Yao Qi  <yao.qi@linaro.org>
    
    	* linux-aarch64-low.c (aarch64_supports_z_point_type): Return
    	0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
    	* server.c (extended_protocol): Remove "static".
    	* server.h (extended_protocol): Declare it.

commit 8a7e4587c4e7d78ebbb9bcc0e65bc03f784fde6b
Author: Yao Qi <yao.qi@linaro.org>
Date:   Tue Aug 4 14:34:14 2015 +0100

    Get and set PC correctly on aarch64 in multi-arch
    
    gdb/gdbserver:
    
    2015-08-04  Yao Qi  <yao.qi@linaro.org>
    
    	* linux-aarch64-low.c (aarch64_get_pc): Get PC register on
    	both aarch64 and aarch32.
    	(aarch64_set_pc): Likewise.

commit 3b53ae99fbb6bea515284f725b83125d09cfea6f
Author: Yao Qi <yao.qi@linaro.org>
Date:   Tue Aug 4 14:34:14 2015 +0100

    Use arm target description and regs_info for 32-bit file on aarch64 GDBserver
    
    This patch teaches aarch64-linux GDBserver use 32-bit arm target
    description and regs_info if the elf file is 32-bit.
    
    gdb/gdbserver:
    
    2015-08-04  Yao Qi  <yao.qi@linaro.org>
    
    	* configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
    	to srv_regobj and append arm-core.xml arm-vfpv3.xml and
    	arm-with-neon.xml to srv_xmlfiles.
    	* linux-aarch64-low.c: Include linux-aarch32-low.h.
    	(is_64bit_tdesc): New function.
    	(aarch64_linux_read_description): New function.
    	(aarch64_arch_setup): Call aarch64_linux_read_description.
    	(regs_info): Rename to regs_info_aarch64.
    	(aarch64_regs_info): Return right regs_info.
    	(initialize_low_arch): Call initialize_low_arch_aarch32.

commit bd9e6534b7be7a228ce339bced963d2d15856390
Author: Yao Qi <yao.qi@linaro.org>
Date:   Tue Aug 4 14:34:14 2015 +0100

    New regs_info for aarch32
    
    This patch adds a new regs_info regs_info_aarch32 for aarch32, which
    can be used by both aarch64 and arm backend.
    
    gdb/gdbserver:
    
    2015-08-04  Yao Qi  <yao.qi@linaro.org>
    
    	* configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
    	* linux-aarch32-low.c: New file.
    	* linux-aarch32-low.h: New file.
    	* linux-arm-low.c (arm_fill_gregset): Move it to
    	linux-aarch32-low.c.
    	(arm_store_gregset): Likewise.
    	(arm_fill_vfpregset): Call arm_fill_vfpregset_num
    	(arm_store_vfpregset): Caa arm_store_vfpregset_num.
    	(arm_arch_setup): Check if PTRACE_GETREGSET works.
    	(regs_info): Rename to regs_info_arm.
    	(arm_regs_info): Return regs_info_aarch32 if
    	have_ptrace_getregset is 1 and target description is
    	arm_with_neon or arm_with_vfpv3.
    	(initialize_low_arch): Don't call init_registers_arm_with_neon.
    	Call initialize_low_arch_aarch32 instead.

commit ded48a5ef34314f7af698b7ec7916b084c94b18d
Author: Yao Qi <yao.qi@linaro.org>
Date:   Tue Aug 4 14:34:14 2015 +0100

    Move have_ptrace_getregset to linux-low.c
    
    This patch moves variable have_ptrace_getregset from linux-x86-low.c
    to linux-low.c, so that arm can use it too.
    
    gdb/gdbserver:
    
    2015-08-04  Yao Qi  <yao.qi@linaro.org>
    
    	* linux-x86-low.c (have_ptrace_getregset): Move it to ...
    	* linux-low.c: ... here.
    	* linux-low.h (have_ptrace_getregset): Declare it.

commit c6343a91d94e9516afe56dfe85e435922bd9ea04
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Aug 4 13:42:56 2015 +0200

    signal_command: Leftover cleanup chain regression
    
    gdb/ChangeLog
    2015-08-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	* infcmd.c (signal_command): Call do_cleanups for args_chain.

commit 978b9495b78054b76052a09064cae8c94a58b93e
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Aug 4 13:40:44 2015 +0200

    ASAN attach crash - 7.9 regression
    
    -fsanitize=address
    gdb.base/attach-pie-noexec.exp
    
    ==32586==ERROR: AddressSanitizer: heap-use-after-free on address 0x60200004ed90 at pc 0x48ad50 bp 0x7ffceb3aef50 sp 0x7ffceb3aef20
    READ of size 2 at 0x60200004ed90 thread T0
        #0 0x48ad4f in __interceptor_strlen (/home/jkratoch/redhat/gdb-test-asan/gdb/gdb+0x48ad4f)
        #1 0xeafe5c in xstrdup xstrdup.c:33
        #2 0x85e024 in attach_command /home/jkratoch/redhat/gdb-test-asan/gdb/infcmd.c:2680
    
    regressed by:
    
    commit 6c4486e63f7583ed85a0c72841f6ccceebbf858e
    Author: Pedro Alves <palves@redhat.com>
    Date:   Fri Oct 17 13:31:26 2014 +0100
        PR gdb/17471: Repeating a background command makes it foreground
    
    gdb/ChangeLog
    2015-08-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	PR gdb/18767
    	* infcmd.c (attach_command): Move ARGS_CHAIN cleanup after last ARGS
    	use.

commit 9c98104c4c8f558176311dad055897c45b7d8032
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Date:   Tue Jul 28 19:14:37 2015 +0100

    ld: map option for run_dump_test requires no program.
    
    When using run_dump_test with the map option to compare the linker map
    file produced, no additional dump program should be required.  A dump
    program can still be given if needed, but leaving it off will no longer
    produce an error.
    
    ld/testsuite/ChangeLog:
    
    	* ld/ld-lib.exp (run_dump_test): When using the map option, no
    	program is required.

commit bb57e4c7bd1d27c45195efd0b7a612bac831d2df
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Date:   Tue Jul 28 16:20:41 2015 +0100

    ld: Add file based error/warning regexp for run_dump_test.
    
    The run_dump_test mechanism supports options error and warning, which
    allow regexp to be specified within the test file, these regexp are
    matched against the stderr output from the linker.
    
    Similar dump test style functions for gas and gdb also support file
    based matching versions of these options; the patterns are placed into a
    file which the test driver then references.  It is sometimes clearer,
    when the pattern to be matched spans multiple lines if the patterns can
    be placed into a separate file.
    
    This patch adds new options error_output and warning_output for the
    linker run_dump_test function.  These new options take a filename
    parameter, this file is then used (with regexp_diff) to compare against
    the linker output.
    
    ld/testsuite/ChangeLog:
    
    	* ld/ld-lib.exp (run_dump_test): Add error_output and
    	warning_output options.

commit 0a61824343c98b9440fe13752f800d65f765c4c1
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Date:   Wed Jul 15 18:37:30 2015 +0100

    ld: Add '--require-defined' command line option.
    
    Add a new command line option '--require-defined' to the linker.  This
    option operates identically to the '--undefined' option, except that if
    the symbol is not defined in the final output file then the linker will
    exit with an error.
    
    When making use of --gc-section, or just when trying to pull in parts of
    a library, it is not uncommon for a user to use the '--undefined'
    command line option to specify a symbol that the user then expects to be
    defined by one of the object files supplied to the link.
    
    However, if for any reason the symbol is not satisfied by an object
    provided to the link the user will be left with an undefined symbol in
    the output file, instead of a defined symbol.
    
    In some cases the above behaviour is what the user wants, in other cases
    though we can do better.  The '--require-defined' option tries to fill
    this gap.  The symbol passed to the '--require-defined' option is
    treated exactly as if the symbol was passed to '--undefined', however,
    before the linker exits a check is made that all symbols passed to
    '--require-defined' are actually defined, if any are not then the link
    will fail with an error.
    
    ld/ChangeLog:
    
    	* ld.texinfo (Options): Document --require-defined option.
    	* ldlang.c (struct require_defined_symbol): New structure.
    	(require_defined_symbol_list): New variable.
    	(ldlang_add_require_defined): New function.
    	(ldlang_check_require_defined_symbols): New function.
    	(lang_process): Check required symbols are defined.
    	* ldlang.h (ldlang_add_require_defined): Declare.
    	* ldlex.h (enum option_values): Add OPTION_REQUIRE_DEFINED_SYMBOL.
    	* lexsup.c (ld_options): Add '--require-defined' entry.
    	(parse_args): Handle '--require-defined' entry.
    	* NEWS: Mention new '--require-defined' option.
    
    ld/testsuite/ChangeLog:
    
    	* ld-undefined/require-defined-1.d: New file.
    	* ld-undefined/require-defined-2.d: New file.
    	* ld-undefined/require-defined-3.d: New file.
    	* ld-undefined/require-defined-4.d: New file.
    	* ld-undefined/require-defined-5.d: New file.
    	* ld-undefined/require-defined.exp: New file.
    	* ld-undefined/require-defined.s: New file.

commit 96e9210fd6fecc1926559dbfa45e7c7c59f7d821
Author: Pedro Alves <palves@redhat.com>
Date:   Tue Aug 4 09:39:47 2015 +0100

    C++: dlsym casts in gdb/linux-thread-db.c and gdb/gdbserver/thread-db.c
    
    Implicit void * -> function pointer conversion doesn't work in C++, so
    in C++, we need to cast the result of dlsym.  This adds a few typedefs
    and macros that make this easy.  GDBserver's version already had the
    CHK macro, so I added it to GDB too.
    
    Tested on x86_64 Fedora 20, native and gdbserver.
    
    gdb/gdbserver/ChangeLog:
    2015-08-04  Pedro Alves  <palves@redhat.com>
    
    	* thread-db.c (struct thread_db): Use new typedefs.
    	(try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
    	CHK calls.
    	(disable_thread_event_reporting): Cast result of dlsym to
    	destination function pointer type.
    	(thread_db_mourn): Use td_ta_delete_ftype.
    
    gdb/ChangeLog:
    2015-08-04  Pedro Alves  <palves@redhat.com>
    
    	* nat/gdb_thread_db.h (td_init_ftype, td_ta_new_ftype)
    	(td_ta_map_lwp2thr_ftype, td_ta_thr_iter_ftype)
    	(td_ta_event_addr_ftype, td_ta_set_event_ftype)
    	(td_ta_clear_event_ftype, td_ta_event_getmsg_ftype)
    	(td_thr_validate_ftype, td_thr_get_info_ftype)
    	(td_thr_event_enable_ftype, td_thr_tls_get_addr_ftype)
    	(td_thr_tlsbase_ftype, td_symbol_list_ftype, td_ta_delete_ftype):
    	New typedefs.
    	* linux-thread-db.c (struct thread_db_info): Use new typedefs.
    	(try_thread_db_load_1): Define TDB_VERBOSE_DLSYM, TDB_DLSYM , CHK
    	local macros and use them instead of verbose_dlsym and dlsym
    	calls.

commit beab5d94abdbea50febb1e189198fdec43db47c9
Author: Nick Clifton <nickc@redhat.com>
Date:   Tue Aug 4 08:19:12 2015 +0100

    Update description of proc run_dump_test
    
    	* lib/utils-lib.exp (run_dump_test): Document DUMPPROG, readelf
    	and size parameters.  Alpha-sort switch tables.  Include
    	addr2line, and size in list of possible auto-detected dump
    	programs.

commit edc66de9a5883295bb32fad2c87bf4c62f97f54a
Author: Thomas Preud'homme <thomas.preudhomme@arm.com>
Date:   Thu Jul 16 17:51:04 2015 +0800

    2015-08-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
    
            * doc/c-aarch64.texi (.xword): Document directive.

commit a26b73ed2d90d6ef080810fa9dd166b43e8a3eb7
Author: GDB Administrator <gdbadmin@sourceware.org>
Date:   Tue Aug 4 00:00:08 2015 +0000

    Automatic date update in version.in

commit 127fcdff0541697ffd7169abafe5a51118bf65d0
Author: Andrew Burgess <andrew.burgess@embecosm.com>
Date:   Tue Jul 14 16:19:22 2015 +0100

    ld/doc: Document that multiple MEMORY commands are allowed.
    
    The linker documentation explicitly states that there can be only one
    MEMORY command.  This is not true.  Multiple MEMORY commands are
    allowed, the contents of all will be treated as if a single MEMORY
    command was given.
    
    Update the documentation to make this clear to the users.
    
    ld/ChangeLog:
    
    	* ld.texinfo (MEMORY): Explain that multiple MEMORY commands are
    	acceptable.

commit 4122b41366b2e810bbf016d7c5514a496f0aca86
Author: Hans-Peter Nilsson <hp@bitrange.com>
Date:   Mon Aug 3 20:44:05 2015 +0200

    Fix ChangeLog for "FAIL: -Bsymbolic-functions" for cris-linux in ld
    
    It's bfd_link_info, not elf_link_hash_entry, for the old reference:
    
    	* elf32-cris.c (cris_elf_relocate_section)
    	(elf_cris_finish_dynamic_symbol, cris_elf_check_relocs)
    	(elf_cris_discard_excess_dso_dynamics): Use SYMBOLIC_BIND, not
    	just bfd_link_info->symbolic, to check if a symbol should be bound
    	symbolically.

commit af60a1ef46d2c4aca22868b0f2819234b949018e
Author: Sandra Loosemore <sandra@codesourcery.com>
Date:   Mon Aug 3 11:39:52 2015 -0700

    Nios II R2 support for GDB.
    
    2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
    
    	gdb/
    	* nios2-tdep.h: Include opcode/nios2.h here.
    	(NIOS2_CDX_OPCODE_SIZE): New.
    	(struct gdbarch_tdep): Add OP parameter to syscall_next_pc.
    	* nios2-tdep.c: Don't include opcode/nios2.h here.
    	(nios2_fetch_insn): For R2, try reading 2-byte instruction if
    	4-byte read fails.
    	(nios2_match_add, nios2_match_sub): Add cases for R2 encodings.
    	(nios2_match_addi, nios2_match_orhi): Likewise.
    	(nios2_match_stw, nios2_match_ldw): Likewise.
    	(nios2_match_rdctl): Likewise.
    	(nios2_match_stwm, nios2_match_ldwm): New.
    	(nios2_match_branch): Add cases for R2 encodings.
    	(nios2_match_jmpi, nios2_match_calli): Likewise.
    	(nios2_match_jmpr, nios2_match_callr): Likewise.
    	(nios2_match_break, nios2_match_trap): Likewise.
    	(nios2_in_epilogue_p): Add R2 support.
    	(nios2_analyze_prologue): Update comments.  Recognize R2 CDX
    	prologues.
    	(nios2_breakpoint_from_pc): Handle R2 instructions.
    	(nios2_get_next_pc): Likewise.  Adjust call to
    	tdep->syscall_next_pc.
    	* nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame):
    	Renamed from nios2_linux_rt_sigreturn_tramp_frame.  Use
    	instruction field macros instead of literal hex values.
    	(nios2_r2_linux_rt_sigreturn_tramp_frame): New.
    	(nios2_linux_syscall_next_pc): Adjust signature to pass OP.
    	Use size field from OP instead of assuming all instructions
    	are the same size.
    	(nios2_linux_init_abi): Register appropriate unwinder for mach.
    
    	gdb/gdbserver/
    	* linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
    	arch variant.
    	(CDX_BREAKPOINT): Define for R2.
    	(nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
    	(the_low_target): Add comments.

commit cb1c8103f13d413e05ca6e61e21b56bba3baae74
Author: Hans-Peter Nilsson <hp@bitrange.com>
Date:   Mon Aug 3 20:34:51 2015 +0200

    Fix "FAIL: -Bsymbolic-functions" for cris-linux in ld
    
    	* elf32-cris.c (cris_elf_relocate_section)
    	(elf_cris_finish_dynamic_symbol, cris_elf_check_relocs)
    	(elf_cris_discard_excess_dso_dynamics): Use SYMBOLIC_BIND, not
    	just h->symbolic, to check if a symbol should be bound
    	symbolically.

commit ee2d2b102071f89a04f93f0434df818f69ef1e50
Author: Sandra Loosemore <sandra@codesourcery.com>
Date:   Mon Aug 3 11:09:32 2015 -0700

    Further robustify gdb.base/bp-permanent.exp.
    
    2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
    
    	gdb/testsuite/
    	* gdb.base/bp-permanent.exp: Report test as unsupported if
    	the target cannot stop at the permanent breakpoint.

commit 666fcf91c0117da8294207f631df5a97fdc4157c
Author: Pedro Alves <palves@redhat.com>
Date:   Mon Aug 3 18:55:12 2015 +0100

    dwarf2read.c: fix latent buglet
    
    cust->includes is:
    
    struct compunit_symtab
    {
    ...
      struct compunit_symtab **includes;
    
    gdb/ChangeLog:
    2015-08-03  Pedro Alves  <palves@redhat.com>
    
    	* dwarf2read.c (compute_compunit_symtab_includes): Use size of struct
    	compunit_symtab pointer.

commit c8bd4544607d4f41b89b78630fc233f53f90b6a2
Author: Doug Evans <dje@google.com>
Date:   Mon Aug 3 09:27:57 2015 -0700

    Missing changelog entry for previous commit: Add gmonster-{1,2} perf testcases.
    
    These testcases are mocks of real programs.
    GDB doesn't care what the programs do, they just have to look
    and/or behave like the real program.
    These testcases exercise gdb when debugging really large programs.
    E.g., gmonster-1 has 10,000 CUs, and gmonster-2 has 1000 shared libs
    (which is actually a little small, 5000 would be more accurate).
    
    gdb/testsuite/ChangeLog:
    
    	* gdb.perf/lib/perftest/utils.py: New file.
    	* gdb.perf/gm-hello.cc: New file.
    	* gdb.perf/gm-pervasive-typedef.cc: New file.
    	* gdb.perf/gm-pervasive-typedef.h: New file.
    	* gdb.perf/gm-std.cc: New file.
    	* gdb.perf/gm-std.h: New file.
    	* gdb.perf/gm-use-cerr.cc: New file.
    	* gdb.perf/gm-utils.h: New file.
    	* gdb.perf/gmonster-null-lookup.py: New file.
    	* gdb.perf/gmonster-pervasive-typedef.py: New file.
    	* gdb.perf/gmonster-print-cerr.py: New file.
    	* gdb.perf/gmonster-ptype-string.py: New file.
    	* gdb.perf/gmonster-runto-main.py: New file.
    	* gdb.perf/gmonster-select-file.py: New file.
    	* gdb.perf/gmonster1-null-lookup.exp: New file.
    	* gdb.perf/gmonster1-pervasive-typedef.exp: New file.
    	* gdb.perf/gmonster1-print-cerr.exp: New file.
    	* gdb.perf/gmonster1-ptype-string.exp: New file.
    	* gdb.perf/gmonster1-runto-main.exp: New file.
    	* gdb.perf/gmonster1-select-file.exp: New file.
    	* gdb.perf/gmonster1.cc: New file.
    	* gdb.perf/gmonster1.exp: New file.
    	* gdb.perf/gmonster2-null-lookup.exp: New file.
    	* gdb.perf/gmonster2-pervasive-typedef.exp: New file.
    	* gdb.perf/gmonster2-print-cerr.exp: New file.
    	* gdb.perf/gmonster2-ptype-string.exp: New file.
    	* gdb.perf/gmonster2-runto-main.exp: New file.
    	* gdb.perf/gmonster2-select-file.exp: New file.
    	* gdb.perf/gmonster2.cc: New file.
    	* gdb.perf/gmonster2.exp: New file.

commit 8e1afc817ca50aec1e77b5bd2613844bb4b4d932
Author: Doug Evans <dje@google.com>
Date:   Mon Aug 3 09:23:41 2015 -0700

    Fix file paths in earlier entry.

commit 4e1bdb00c63a839037f31f005349c87702d50cfe
Author: Doug Evans <dje@google.com>
Date:   Mon Aug 3 09:21:09 2015 -0700

    gdb.perf/single-step.exp (SINGLE_STEP_COUNT): Change to 1000 from 10000.
    
    single-step.exp takes a while to run, and while that's not necessarily
    bad, here it's because the default value of SINGLE_STEP_COUNT is 10,000.
    We're not going to gain any more insight into perf issues
    single-stepping (stepi) 10,000 times over 1,000 times,
    so this patch changes the default to 1,000.
    
    gdb/testsuite/ChangeLog:
    
    	* gdb.perf/single-step.exp (SINGLE_STEP_COUNT): Change to 1000 from
    	10000.

-----------------------------------------------------------------------

Summary of changes:
 bfd/ChangeLog                                      |   26 +
 bfd/elf.c                                          |   57 ++
 bfd/elf32-cris.c                                   |   14 +-
 bfd/ihex.c                                         |    6 +-
 bfd/srec.c                                         |    2 +-
 bfd/version.h                                      |    2 +-
 binutils/ChangeLog                                 |   17 +
 binutils/ar.c                                      |    1 +
 binutils/doc/binutils.texi                         |   17 +-
 binutils/readelf.c                                 |    2 +-
 binutils/testsuite/ChangeLog                       |   13 +
 binutils/testsuite/binutils-all/objcopy.exp        |   67 ++
 binutils/testsuite/lib/utils-lib.exp               |   36 +-
 gas/ChangeLog                                      |    4 +
 gas/doc/c-aarch64.texi                             |    4 +
 gdb/ChangeLog                                      |  102 +++
 gdb/aarch64-linux-nat.c                            |   26 +-
 gdb/arm-linux-nat.c                                |   37 +-
 gdb/breakpoint.c                                   |   18 +-
 gdb/dwarf2read.c                                   |    2 +-
 gdb/exec.c                                         |   30 +-
 gdb/exec.h                                         |    2 +
 gdb/gdbserver/ChangeLog                            |   72 ++
 gdb/gdbserver/configure.srv                        |    5 +
 gdb/gdbserver/linux-aarch32-low.c                  |  140 ++++
 gdb/gdbserver/linux-aarch32-low.h                  |   29 +
 gdb/gdbserver/linux-aarch64-low.c                  |  100 +++-
 gdb/gdbserver/linux-arm-low.c                      |   78 +--
 gdb/gdbserver/linux-low.c                          |    3 +
 gdb/gdbserver/linux-low.h                          |    2 +
 gdb/gdbserver/linux-nios2-low.c                    |   25 +-
 gdb/gdbserver/linux-x86-low.c                      |    3 -
 gdb/gdbserver/server.c                             |    2 +-
 gdb/gdbserver/server.h                             |    1 +
 gdb/gdbserver/thread-db.c                          |   70 +--
 gdb/infcmd.c                                       |   25 +-
 gdb/inferior.c                                     |    3 +
 gdb/linux-thread-db.c                              |  100 ++--
 gdb/main.c                                         |   24 +-
 gdb/nat/gdb_thread_db.h                            |   60 ++
 gdb/nios2-linux-tdep.c                             |   36 +-
 gdb/nios2-tdep.c                                   |  709 +++++++++++++++++---
 gdb/nios2-tdep.h                                   |    7 +-
 gdb/progspace.h                                    |   17 +
 gdb/python/py-linetable.c                          |   14 +-
 gdb/python/py-symtab.c                             |    8 +-
 gdb/remote.c                                       |    9 +-
 gdb/solib.c                                        |   17 +-
 gdb/symfile.c                                      |    3 +
 gdb/testsuite/ChangeLog                            |   54 ++-
 gdb/testsuite/gdb.base/bp-permanent.exp            |   17 +-
 gdb/testsuite/gdb.perf/single-step.exp             |    2 +-
 .../gdb.threads/next-while-other-thread-longjmps.c |  127 ++++
 .../next-while-other-thread-longjmps.exp           |   40 ++
 gdb/xtensa-linux-nat.c                             |   18 +-
 ld/ChangeLog                                       |   19 +
 ld/NEWS                                            |    3 +
 ld/ld.texinfo                                      |   23 +-
 ld/ldlang.c                                        |   52 ++
 ld/ldlang.h                                        |    2 +
 ld/ldlex.h                                         |    1 +
 ld/lexsup.c                                        |    6 +
 ld/testsuite/ChangeLog                             |   20 +
 ld/testsuite/ld-undefined/require-defined-1.d      |    4 +
 ld/testsuite/ld-undefined/require-defined-2.d      |    8 +
 ld/testsuite/ld-undefined/require-defined-3.d      |    8 +
 ld/testsuite/ld-undefined/require-defined-4.d      |    8 +
 ld/testsuite/ld-undefined/require-defined-5.d      |   10 +
 ld/testsuite/ld-undefined/require-defined.exp      |   58 ++
 ld/testsuite/ld-undefined/require-defined.s        |    9 +
 ld/testsuite/lib/ld-lib.exp                        |   95 +++-
 sim/m32c/ChangeLog                                 |    5 +
 sim/m32c/gdb-if.c                                  |    6 +
 73 files changed, 2223 insertions(+), 419 deletions(-)
 create mode 100644 gdb/gdbserver/linux-aarch32-low.c
 create mode 100644 gdb/gdbserver/linux-aarch32-low.h
 create mode 100644 gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.c
 create mode 100644 gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.exp
 create mode 100644 ld/testsuite/ld-undefined/require-defined-1.d
 create mode 100644 ld/testsuite/ld-undefined/require-defined-2.d
 create mode 100644 ld/testsuite/ld-undefined/require-defined-3.d
 create mode 100644 ld/testsuite/ld-undefined/require-defined-4.d
 create mode 100644 ld/testsuite/ld-undefined/require-defined-5.d
 create mode 100644 ld/testsuite/ld-undefined/require-defined.exp
 create mode 100644 ld/testsuite/ld-undefined/require-defined.s

First 500 lines of diff:
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index e9776bf..601ce3b 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,29 @@
+2015-08-05  Nick Clifton  <nickc@redhat.com>
+
+	* elf.c (_bfd_elf_copy_private_bfd_data): Copy the sh_link and
+	sh_info fields of sections whose type has been changed to
+	SHT_NOBITS.
+
+2015-08-04  Yuriy M. Kaminskiy"  <yumkam@gmail.com>
+	    Tyler Hicks  <tyhicks@canonical.com>
+
+	PR binutils/18750
+	* ihex.c (ihex_scan): Fixes incorrect escape sequence in error message
+	and stack overflow when char is signed and \200-\376 was in place of hex
+	digit; also fixes \377 was handled as EOF instead of "incorrect character".
+	(ihex_read_section): Changed for consistency.
+	(ihex_bad_byte): Prevent (now impossible to trigger) stack
+	overflow and incorrect escape sequence handling.
+	* srec.c (srec_bad_byte): Likewise.
+
+2015-08-03  Hans-Peter Nilsson  <hp@axis.com>
+
+	* elf32-cris.c (cris_elf_relocate_section)
+	(elf_cris_finish_dynamic_symbol, cris_elf_check_relocs)
+	(elf_cris_discard_excess_dso_dynamics): Use SYMBOLIC_BIND, not
+	just link_info->symbolic, to check if a symbol should be bound
+	symbolically.
+
 2015-07-30  H.J. Lu  <hongjiu.lu@intel.com>
 
 	PR ld/18735
diff --git a/bfd/elf.c b/bfd/elf.c
index 05ee025..67e4240 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1203,6 +1203,63 @@ _bfd_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
 
   /* Copy object attributes.  */
   _bfd_elf_copy_obj_attributes (ibfd, obfd);
+
+  /* This is an feature for objcopy --only-keep-debug:  When a section's type
+     is changed to NOBITS, we preserve the sh_link and sh_info fields so that
+     they can be matched up with the original.  */
+  Elf_Internal_Shdr ** iheaders = elf_elfsections (ibfd);
+  Elf_Internal_Shdr ** oheaders = elf_elfsections (obfd);
+
+  if (iheaders != NULL && oheaders != NULL)
+    {
+      unsigned int i;
+
+      for (i = 0; i < elf_numsections (obfd); i++)
+	{
+	  unsigned int j;
+	  Elf_Internal_Shdr * oheader = oheaders[i];
+
+	  if (oheader == NULL
+	      || oheader->sh_type != SHT_NOBITS
+	      || oheader->sh_size == 0
+	      || (oheader->sh_info != 0 && oheader->sh_link != 0))
+	    continue;
+
+	  /* Scan for the matching section in the input bfd.
+	     FIXME: We could use something better than a linear scan here.
+	     Unfortunately we cannot compare names as the output string table
+	     is empty, so instead we check size, address and type.  */
+	  for (j = 0; j < elf_numsections (ibfd); j++)
+	    {
+	      Elf_Internal_Shdr * iheader = iheaders[j];
+	      
+	      if (iheader->sh_type != SHT_NOBITS
+		  && iheader->sh_size == oheader->sh_size
+		  && iheader->sh_addr == oheader->sh_addr
+		  && (iheader->sh_info != oheader->sh_info
+		      || iheader->sh_link != oheader->sh_link))
+		{
+		  /* Note: Strictly speaking these assignments are wrong.
+		     The sh_link and sh_info fields should point to the
+		     relevent sections in the output BFD, which may not be in
+		     the same location as they were in the input BFD.  But the
+		     whole point of this action is to preserve the original
+		     values of the sh_link and sh_info fields, so that they
+		     can be matched up with the section headers in the
+		     original file.  So strictly speaking we may be creating
+		     an invalid ELF file, but it is only for a file that just
+		     contains debug info and only for sections without any
+		     contents.  */
+		  if (oheader->sh_link == 0)
+		    oheader->sh_link = iheader->sh_link;
+		  if (oheader->sh_info == 0)
+		    oheader->sh_info = iheader->sh_info;
+		  break;
+		}
+	    }
+	}
+    }
+
   return TRUE;
 }
 
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index d5670ac..439ce11 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -1093,7 +1093,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
 		 h->elf_link_hash_flags test, though it's there in
 		 other targets.  */
 	      if (info->shared
-		  && ((! info->symbolic && h->dynindx != -1)
+		  && ((!SYMBOLIC_BIND (info, h) && h->dynindx != -1)
 		      || !h->def_regular)
 		  && (input_section->flags & SEC_ALLOC) != 0
 		  && (r_type == R_CRIS_8
@@ -1212,7 +1212,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
 			    || h->type == STT_FUNC
 			    || h->needs_plt))
 		    || (info->shared
-			&& (info->symbolic || h->dynindx == -1)
+			&& (SYMBOLIC_BIND (info, h) || h->dynindx == -1)
 			&& h->def_regular))
 		  {
 		    /* This wasn't checked above for ! info->shared, but
@@ -1432,7 +1432,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
 	      && ((r_type != R_CRIS_8_PCREL
 		   && r_type != R_CRIS_16_PCREL
 		   && r_type != R_CRIS_32_PCREL)
-		  || (!info->symbolic
+		  || (!SYMBOLIC_BIND (info, h)
 		      || (h != NULL && !h->def_regular))))
 	    {
 	      Elf_Internal_Rela outrel;
@@ -1484,7 +1484,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
 	      /* h->dynindx may be -1 if the symbol was marked to
 		 become local.  */
 	      else if (h != NULL
-		       && ((! info->symbolic && h->dynindx != -1)
+		       && ((!SYMBOLIC_BIND (info, h) && h->dynindx != -1)
 			   || !h->def_regular))
 		{
 		  BFD_ASSERT (h->dynindx != -1);
@@ -2245,7 +2245,7 @@ elf_cris_finish_dynamic_symbol (bfd *output_bfd,
       where = sgot->contents + (h->got.offset &~ (bfd_vma) 1);
       if (! elf_hash_table (info)->dynamic_sections_created
 	  || (info->shared
-	      && (info->symbolic || h->dynindx == -1)
+	      && (SYMBOLIC_BIND (info, h) || h->dynindx == -1)
 	      && h->def_regular))
 	{
 	  rela.r_info = ELF32_R_INFO (0, R_CRIS_RELATIVE);
@@ -3661,7 +3661,7 @@ cris_elf_check_relocs (bfd *abfd,
 	     this shared library) then we can also eliminate the
 	     reloc.  See comment above for more eliminable cases which
 	     we can't identify at this time.  */
-	  if (info->symbolic
+	  if (SYMBOLIC_BIND (info, h)
 	      && h->root.type != bfd_link_hash_defweak
 	      && h->def_regular)
 	    break;
@@ -3953,7 +3953,7 @@ elf_cris_discard_excess_dso_dynamics (struct elf_cris_link_hash_entry *h,
      any relocs.  */
   if (h->root.def_regular
       && (h->root.forced_local
-	  || info->symbolic))
+	  || SYMBOLIC_BIND (info, &h->root)))
     {
       for (s = h->pcrel_relocs_copied; s != NULL; s = s->next)
 	{
diff --git a/bfd/ihex.c b/bfd/ihex.c
index 8e66372..38112f6 100644
--- a/bfd/ihex.c
+++ b/bfd/ihex.c
@@ -219,7 +219,7 @@ ihex_bad_byte (bfd *abfd, unsigned int lineno, int c, bfd_boolean error)
       char buf[10];
 
       if (! ISPRINT (c))
-	sprintf (buf, "\\%03o", (unsigned int) c);
+	sprintf (buf, "\\%03o", (unsigned int) c & 0xff);
       else
 	{
 	  buf[0] = c;
@@ -276,7 +276,7 @@ ihex_scan (bfd *abfd)
       else
 	{
 	  file_ptr pos;
-	  char hdr[8];
+	  unsigned char hdr[8];
 	  unsigned int i;
 	  unsigned int len;
 	  bfd_vma addr;
@@ -553,7 +553,7 @@ ihex_read_section (bfd *abfd, asection *section, bfd_byte *contents)
   error = FALSE;
   while ((c = ihex_get_byte (abfd, &error)) != EOF)
     {
-      char hdr[8];
+      unsigned char hdr[8];
       unsigned int len;
       unsigned int type;
       unsigned int i;
diff --git a/bfd/srec.c b/bfd/srec.c
index 24573cf..96b6a2f 100644
--- a/bfd/srec.c
+++ b/bfd/srec.c
@@ -249,7 +249,7 @@ srec_bad_byte (bfd *abfd,
       char buf[40];
 
       if (! ISPRINT (c))
-	sprintf (buf, "\\%03o", (unsigned int) c);
+	sprintf (buf, "\\%03o", (unsigned int) c & 0xff);
       else
 	{
 	  buf[0] = c;
diff --git a/bfd/version.h b/bfd/version.h
index 3ee5693..d6a887b 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20150803
+#define BFD_VERSION_DATE 20150805
 #define BFD_VERSION @bfd_version@
 #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
 #define REPORT_BUGS_TO @report_bugs_to@
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 75f5d21..0b5ff7f 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,20 @@
+2015-08-05  Nick Clifton  <nickc@redhat.com>
+
+	* doc/binutils.texi: Document that the --only-keep-debug option
+	to strip and objcopy preserves the section headers of stripped
+	sections.
+
+2015-08-04  Yuriy M. Kaminskiy"  <yumkam@gmail.com>
+	    Tyler Hicks  <tyhicks@canonical.com>
+
+	PR binutils/18750
+	* readelf.c (process_mips_specific): Fix incorrect escape
+	sequence handling.
+
+2015-08-04  Nick Clifton  <nickc@redhat.com>
+
+	* ar.c (extract_file): Free cbuf if the path is invalid.
+
 2015-07-27  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* configure: Regenerated.
diff --git a/binutils/ar.c b/binutils/ar.c
index 94c79e2..2765dcc 100644
--- a/binutils/ar.c
+++ b/binutils/ar.c
@@ -1041,6 +1041,7 @@ extract_file (bfd *abfd)
     {
       non_fatal (_("illegal pathname found in archive member: %s"),
 		 bfd_get_filename (abfd));
+      free (cbuf);
       return;
     }
 
diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi
index 466f125..fef5f3e 100644
--- a/binutils/doc/binutils.texi
+++ b/binutils/doc/binutils.texi
@@ -1731,6 +1731,12 @@ Strip a file, removing contents of any sections that would not be
 stripped by @option{--strip-debug} and leaving the debugging sections
 intact.  In ELF files, this preserves all note sections in the output.
 
+Note - the section headers of the stripped sections are preserved,
+including their sizes, but the contents of the section are discarded.
+The section headers are preserved so that other tools can match up the
+debuginfo file with the real executable, even if that executable has
+been relocated to a different address space.
+
 The intention is that this option will be used in conjunction with
 @option{--add-gnu-debuglink} to create a two part executable.  One a
 stripped binary which will occupy less space in RAM and in a
@@ -3074,9 +3080,16 @@ When stripping a file, perhaps with @option{--strip-debug} or
 which would otherwise get stripped.
 
 @item --only-keep-debug
-Strip a file, removing contents of any sections that would not be
+Strip a file, emptying the contents of any sections that would not be
 stripped by @option{--strip-debug} and leaving the debugging sections
-intact.  In ELF files, this preserves all note sections in the output.
+intact.  In ELF files, this preserves all the note sections in the
+output as well.
+
+Note - the section headers of the stripped sections are preserved,
+including their sizes, but the contents of the section are discarded.
+The section headers are preserved so that other tools can match up the
+debuginfo file with the real executable, even if that executable has
+been relocated to a different address space.
 
 The intention is that this option will be used in conjunction with
 @option{--add-gnu-debuglink} to create a two part executable.  One a
diff --git a/binutils/readelf.c b/binutils/readelf.c
index a9b9f2d..6298f1e 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -14467,7 +14467,7 @@ process_mips_specific (FILE * file)
 	      len = sizeof (* eopt);
 	      while (len < option->size)
 		{
-		  char datum = * ((char *) eopt + offset + len);
+		  unsigned char datum = * ((unsigned char *) eopt + offset + len);
 
 		  if (ISPRINT (datum))
 		    printf ("%c", datum);
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog
index a0fb962..9255fb9 100644
--- a/binutils/testsuite/ChangeLog
+++ b/binutils/testsuite/ChangeLog
@@ -1,3 +1,16 @@
+2015-08-05  Nick Clifton  <nickc@redhat.com>
+
+	* binutils-all/objcopy.exp (keep_debug_symbols_and_check_links):
+	New proc.  Checks that debug-info-only binaries retain the
+	sh_link field in stripped sections.
+
+2015-08-04  Nick Clifton  <nickc@redhat.com>
+
+	* lib/utils-lib.exp (run_dump_test): Document DUMPPROG, readelf
+	and size parameters.  Alpha-sort switch tables.  Include
+	addr2line, and size in list of possible auto-detected dump
+	programs.
+
 2015-07-24  Nick Clifton  <nickc@redhat.com>
 
 	* binutils-all/localize-hidden-1.d: Allow for extra symbols in the
diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp
index ae21b22..01d2e17 100644
--- a/binutils/testsuite/binutils-all/objcopy.exp
+++ b/binutils/testsuite/binutils-all/objcopy.exp
@@ -829,12 +829,70 @@ proc keep_debug_symbols_and_test_copy { prog1 flags1 test1 prog2 flags2 test2 }
     pass $test2
 }
 
+# Tests that in a debug only copy of a file the sections
+# headers whoes types have been changed to NOBITS still
+# retain their sh_link fields.
+
+proc keep_debug_symbols_and_check_links { prog flags test } {
+    global READELF
+
+    remote_file build delete tmpdir/striprog
+    remote_download build tmpdir/copyprog tmpdir/striprog
+    if [is_remote host] {
+	set copyfile [remote_download host tmpdir/striprog]
+    } else {
+	set copyfile tmpdir/striprog
+    }
+
+    set exec_output [binutils_run $prog "$flags ${copyfile}"]
+    if ![string match "" $exec_output] {
+	fail $test
+	return
+    }
+
+    set got [binutils_run $READELF "-S --wide ${copyfile}"]
+
+    set fails 0
+    # Regexp to match a section with NOBITS type and extract its name and sh_link fields
+    while {[regexp \
+		{[^a-zA-Z]+([a-zA-Z0-9_\.]+)[ 	]+NOBITS[ 	]+[0-9a-fA-F]+ [0-9a-fA-F]+ [0-9a-fA-F]+ [0-9]+[ A]+([0-9]+)(.*)} \
+		$got all name link rest]} {
+	set sh_link 0x$link
+	if {$sh_link == 0} {
+	    # Only some NOBITS sections should have a non-zero sh_link field.
+	    # Look for them by name.
+	    verbose "NOBITS section .$name has a 0 sh_link field\n"
+	    switch $name {
+		"rela.*"	{ set fails 1 ; send_log "Expected non-zero sh_link for .$name\n" }
+		"rel.*"		{ set fails 1 ; send_log "Expected non-zero sh_link for .$name\n" }
+		"hash"		{ set fails 1 ; send_log "Expected non-zero sh_link for .$name\n" }
+		"gnu_version"	{ set fails 1 ; send_log "Expected non-zero sh_link for .$name\n" }
+		"dynsym"	{ set fails 1 ; send_log "Expected non-zero sh_link for .$name\n" }
+		"gnu.version_r"	{ set fails 1 ; send_log "Expected non-zero sh_link for .$name\n" }
+		"dynamic"	{ set fails 1 ; send_log "Expected non-zero sh_link for .$name\n" }
+		"symtab"	{ set fails 1 ; send_log "Expected non-zero sh_link for .$name\n" }
+	    }
+	}
+	set got $rest
+    }
+
+    if {$fails == 0} {
+	pass $test
+    } else {
+	fail $test
+    }
+}
+
+
 set test1 "simple objcopy of executable"
 set test2 "run objcopy of executable"
 set test3 "run stripped executable"
 set test4 "run stripped executable with saving a symbol"
 set test5 "keep only debug data"
 set test6 "simple objcopy of debug data"
+if [is_elf_format] {
+    set test7 "NOBITS sections retain sh_link field"
+}
 
 switch [copy_setup] {
     "1" {
@@ -847,6 +905,9 @@ switch [copy_setup] {
 	untested $test4
 	untested $test5
 	untested $test6
+	if [is_elf_format] {
+	    untested $test7
+	}
     }
     "3" {
 	copy_executable "$OBJCOPY" "$OBJCOPYFLAGS" "$test1" ""
@@ -855,6 +916,9 @@ switch [copy_setup] {
 	unsupported $test4
 	unsupported $test5
 	unsupported $test6
+	if [is_elf_format] {
+	    unsupported $test7
+	}
     }
     "0" {
 	copy_executable "$OBJCOPY" "$OBJCOPYFLAGS" "$test1" "$test2"
@@ -862,6 +926,9 @@ switch [copy_setup] {
 	strip_executable_with_saving_a_symbol "$STRIP" "-K main -K _main $STRIPFLAGS" "$test4"
 	keep_debug_symbols_and_test_copy "$STRIP" "--only-keep-debug $STRIPFLAGS" "$test5" \
 					 "$OBJCOPY" "$OBJCOPYFLAGS" "$test6"
+	if [is_elf_format] {
+	    keep_debug_symbols_and_check_links "$STRIP" "--only-keep-debug $STRIPFLAGS" "$test7"
+	}
     }
 }
 
diff --git a/binutils/testsuite/lib/utils-lib.exp b/binutils/testsuite/lib/utils-lib.exp
index f87b390..9c24cf1 100644
--- a/binutils/testsuite/lib/utils-lib.exp
+++ b/binutils/testsuite/lib/utils-lib.exp
@@ -180,14 +180,22 @@ proc exe_ext {} {
 #	When assembling FILE.s, pass FLAGS to the assembler.
 #
 #   PROG: PROGRAM-NAME
-#       The name of the program to run to analyze the .o file produced
-#       by the assembler.  This can be omitted; run_dump_test will guess
-#       which program to run by seeing which of the flags options below
-#	is present.
+#       The name of the program to run to modify or analyze the .o file
+#       produced by the assembler.  This option is required.  Recognised
+#       names are: ar, elfedit, nm, objcopy, ranlib, strings, and strip.
+#
+#   DUMPPROG: PROGRAM-NAME
+#       The name of the program to run to analyze the .o file after it has
+#       has been modified by PROG.  This can be omitted; run_dump_test will
+#       guess which program to run by seeing if any of the flags options
+#       for the recognised dump programs are set.  Recognised names are:
+#       addr2line, nm, objdump, readelf and size.
 #
-#   objdump: FLAGS
 #   nm: FLAGS
 #   objcopy: FLAGS
+#   objdump: FLAGS
+#   readelf: FLAGS
+#   size: FLAGS
 #	Use the specified program to analyze the .o file, and pass it
 #	FLAGS, in addition to the .o file name.  Note that they are run
 #	with LC_ALL=C in the environment to give consistent sorting
@@ -269,16 +277,16 @@ proc run_dump_test { name {extra_options {}} } {
     set opts(addr2line) {}
     set opts(ar) {}
     set opts(as) {}
+    set opts(elfedit) {}
+    set opts(name) {}
     set opts(nm) {}
     set opts(objcopy) {}
     set opts(objdump) {}
-    set opts(strip) {}
     set opts(ranlib) {}
     set opts(readelf) {}
     set opts(size) {}
     set opts(strings) {}
-    set opts(name) {}
-    set opts(elfedit) {}
+    set opts(strip) {}
     set opts(PROG) {}
     set opts(DUMPPROG) {}
     set opts(source) {}
@@ -337,7 +345,7 @@ proc run_dump_test { name {extra_options {}} } {
     verbose "Testing $testname"
 
     if {$opts(PROG) == ""} {
-	perror "program isn't set in $file.d"
+	perror "PROG isn't set in $file.d"
 	unresolved $testname
 	return
     }
@@ -345,15 +353,15 @@ proc run_dump_test { name {extra_options {}} } {
     set destopt ""
     switch -- $opts(PROG) {
 	ar	{ set program ar }


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-08-12 15:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-12 15:39 [SCM] jankratochvil/gdbserverbuildid-locate: sticky jkratoch
  -- strict thread matches above, loose matches on Subject: below --
2015-08-12 14:18 jkratoch
2015-08-11 21:01 jkratoch
2015-08-05 20:59 jkratoch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).